FLTK logo

[master] dffbaa8 - X11+Xft : remove run-time warning about missing call to FcInit().

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
[  All Forums  |  Back to fltk.commit  ]
 
[ Previous Message ] [ Next Message ]

[master] dffbaa8 - X11+Xft : remove run-time warning about missing call to FcInit(). "ManoloFLTK" 13:32 Sep 28  
 
commit dffbaa82d71c8dcf5ee7dc5a479abce41880c218
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Sep 28 15:25:29 2026 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Sep 28 15:25:29 2026 +0200

    X11+Xft : remove run-time warning about missing call to FcInit().

 src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
index 5d2914b..8f77477 100644
--- src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
+++ src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
@@ -483,6 +483,8 @@ void Fl_Xlib_Graphics_Driver::font_unscaled(Fl_Font fnum, Fl_Fontsize size) {
 }
 
 static XftFont* fontopen(const char* name, /*Fl_Fontsize*/double size, bool core, int angle) {
+  static bool fc_init_done = false;
+  if (!fc_init_done) fc_init_done = FcInit();
   // Check: does it look like we have been passed an old-school XLFD fontname?
   bool is_xlfd = false;
   int hyphen_count = 0;
[ Direct Link to Message ]
 
     
[ Previous Message ] [ Next Message ]
 
 

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