[master] 1a84179 - Fl_Xlib_Font_Descriptor does not need char glok[64] when USE_XFT is on

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 1a84179 - Fl_Xlib_Font_Descriptor does not need char glok[64] when USE_XFT is on "ManoloFLTK" 03:02 Oct 08 top right image
 
commit 1a841795d1bd6580cb696c21a22d3815b0b3f09a
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu Oct 8 11:57:22 2020 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Thu Oct 8 11:57:34 2020 +0200

    Fl_Xlib_Font_Descriptor does not need char glok[64] when USE_XFT is on

 src/drivers/Xlib/Fl_Font.H | 2 +-
 src/gl_draw.cxx            | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git src/drivers/Xlib/Fl_Font.H src/drivers/Xlib/Fl_Font.H
index 3b220e5..474d6ce 100644
--- src/drivers/Xlib/Fl_Font.H
+++ src/drivers/Xlib/Fl_Font.H
@@ -44,10 +44,10 @@ public:
 #  else
   XUtf8FontStruct* font;        // X UTF-8 font information
   FL_EXPORT Fl_Xlib_Font_Descriptor(const char* xfontname);
-#  endif
 #  if HAVE_GL
   char glok[64];
 #  endif // HAVE_GL
+#  endif // USE_XFT
   FL_EXPORT ~Fl_Xlib_Font_Descriptor();
 };
 
diff --git src/gl_draw.cxx src/gl_draw.cxx
index dc70b9c..d16e98a 100644
--- src/gl_draw.cxx
+++ src/gl_draw.cxx
@@ -674,15 +674,15 @@ void Fl_X11_Gl_Window_Driver::gl_bitmap_font(Fl_Font_Descriptor *fl_fontsize) {
 
 
 void Fl_X11_Gl_Window_Driver::get_list(Fl_Font_Descriptor *fd, int r) {
-  Fl_Xlib_Font_Descriptor *gl_fd = (Fl_Xlib_Font_Descriptor*)fd;
-  if (gl_fd->glok[r]) return;
-  gl_fd->glok[r] = 1;
 # if USE_XFT
   /* We hope not to come here: We hope that any system using XFT will also
    * have sufficient GL capability to support our font texture pile mechansim,
    * allowing XFT to render the face directly. */
   // Face already set by gl_bitmap_font in this case.
 # else
+  Fl_Xlib_Font_Descriptor *gl_fd = (Fl_Xlib_Font_Descriptor*)fd;
+  if (gl_fd->glok[r]) return;
+  gl_fd->glok[r] = 1;
   unsigned int ii = r * 0x400;
   for (int i = 0; i < 0x400; i++) {
     XFontStruct *font = NULL;
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2020 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.