wok diff fltk/stuff/Fl_XFont_On_Demand.patch @ rev 23809

linld: add isoboot (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 24 16:43:25 2020 +0000 (2020-05-24)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/fltk/stuff/Fl_XFont_On_Demand.patch	Sun May 24 16:43:25 2020 +0000
     1.3 @@ -0,0 +1,42 @@
     1.4 +Index: src/fl_font.cxx
     1.5 +===================================================================
     1.6 +--- src/fl_font.cxx	(revision 10503)
     1.7 ++++ src/fl_font.cxx	(revision 10504)
     1.8 +@@ -55,6 +55,12 @@
     1.9 + #  include "fl_font_x.cxx"
    1.10 + #endif // WIN32
    1.11 + 
    1.12 ++#if ! (defined(WIN32) || defined(__APPLE__))
    1.13 ++XFontStruct *fl_X_core_font()
    1.14 ++{
    1.15 ++  return fl_xfont.value();
    1.16 ++}
    1.17 ++#endif
    1.18 + 
    1.19 + double fl_width(const char* c) {
    1.20 +   if (c) return fl_width(c, (int) strlen(c));
    1.21 +Index: src/gl_draw.cxx
    1.22 +===================================================================
    1.23 +--- src/gl_draw.cxx	(revision 10503)
    1.24 ++++ src/gl_draw.cxx	(revision 10504)
    1.25 +@@ -81,7 +81,7 @@
    1.26 +  * then sorting through them at draw time (for normal X rendering) to find which one can
    1.27 +  * render the current glyph... But for now, just use the first font in the list for GL...
    1.28 +  */
    1.29 +-    XFontStruct *font = fl_xfont;
    1.30 ++    XFontStruct *font = fl_X_core_font();
    1.31 +     int base = font->min_char_or_byte2;
    1.32 +     int count = font->max_char_or_byte2-base+1;
    1.33 +     fl_fontsize->listbase = glGenLists(256);
    1.34 +Index: FL/x.H
    1.35 +===================================================================
    1.36 +--- FL/x.H	(revision 10503)
    1.37 ++++ FL/x.H	(revision 10504)
    1.38 +@@ -132,6 +132,7 @@
    1.39 +   XFontStruct *ptr;
    1.40 + };
    1.41 + extern FL_EXPORT Fl_XFont_On_Demand fl_xfont;
    1.42 ++extern FL_EXPORT XFontStruct* fl_X_core_font();
    1.43 + 
    1.44 + // this object contains all X-specific stuff about a window:
    1.45 + // Warning: this object is highly subject to change!