wok annotate fltk/stuff/Fl_XFont_On_Demand.patch @ rev 19447
fltk: add Fl_XFont_On_Demand.patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 15 19:21:45 2016 +0200 (2016-10-15) |
parents | |
children |
rev | line source |
---|---|
pascal@19447 | 1 Index: src/fl_font.cxx |
pascal@19447 | 2 =================================================================== |
pascal@19447 | 3 --- src/fl_font.cxx (revision 10503) |
pascal@19447 | 4 +++ src/fl_font.cxx (revision 10504) |
pascal@19447 | 5 @@ -55,6 +55,12 @@ |
pascal@19447 | 6 # include "fl_font_x.cxx" |
pascal@19447 | 7 #endif // WIN32 |
pascal@19447 | 8 |
pascal@19447 | 9 +#if ! (defined(WIN32) || defined(__APPLE__)) |
pascal@19447 | 10 +XFontStruct *fl_X_core_font() |
pascal@19447 | 11 +{ |
pascal@19447 | 12 + return fl_xfont.value(); |
pascal@19447 | 13 +} |
pascal@19447 | 14 +#endif |
pascal@19447 | 15 |
pascal@19447 | 16 double fl_width(const char* c) { |
pascal@19447 | 17 if (c) return fl_width(c, (int) strlen(c)); |
pascal@19447 | 18 Index: src/gl_draw.cxx |
pascal@19447 | 19 =================================================================== |
pascal@19447 | 20 --- src/gl_draw.cxx (revision 10503) |
pascal@19447 | 21 +++ src/gl_draw.cxx (revision 10504) |
pascal@19447 | 22 @@ -81,7 +81,7 @@ |
pascal@19447 | 23 * then sorting through them at draw time (for normal X rendering) to find which one can |
pascal@19447 | 24 * render the current glyph... But for now, just use the first font in the list for GL... |
pascal@19447 | 25 */ |
pascal@19447 | 26 - XFontStruct *font = fl_xfont; |
pascal@19447 | 27 + XFontStruct *font = fl_X_core_font(); |
pascal@19447 | 28 int base = font->min_char_or_byte2; |
pascal@19447 | 29 int count = font->max_char_or_byte2-base+1; |
pascal@19447 | 30 fl_fontsize->listbase = glGenLists(256); |
pascal@19447 | 31 Index: FL/x.H |
pascal@19447 | 32 =================================================================== |
pascal@19447 | 33 --- FL/x.H (revision 10503) |
pascal@19447 | 34 +++ FL/x.H (revision 10504) |
pascal@19447 | 35 @@ -132,6 +132,7 @@ |
pascal@19447 | 36 XFontStruct *ptr; |
pascal@19447 | 37 }; |
pascal@19447 | 38 extern FL_EXPORT Fl_XFont_On_Demand fl_xfont; |
pascal@19447 | 39 +extern FL_EXPORT XFontStruct* fl_X_core_font(); |
pascal@19447 | 40 |
pascal@19447 | 41 // this object contains all X-specific stuff about a window: |
pascal@19447 | 42 // Warning: this object is highly subject to change! |