summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-14 08:15:50 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-14 08:15:50 +0200
commit0fe118aa946a6c195d53b929a37be6c1cb3c1bd3 (patch)
tree6f6574c9996cf40b804e2e317831243f8ef78a27 /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
parent4769e0085d7e259d68de1f4d22b6a83509fcad05 (diff)
Remove duplication of Pango standard font names
And move each array of standard font names to appropriate font-related source file
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
index 9fc98f0dd..8fe677939 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
@@ -34,6 +34,52 @@
Fl_XFont_On_Demand fl_xfont = 0;
+
+#if ! USE_PANGO
+
+// The predefined fonts that FLTK has with Xft but without Pango:
+static Fl_Fontdesc built_in_table[] = {
+#if 1
+ {" sans"},
+ {"Bsans"},
+ {"Isans"},
+ {"Psans"},
+ {" mono"},
+ {"Bmono"},
+ {"Imono"},
+ {"Pmono"},
+ {" serif"},
+ {"Bserif"},
+ {"Iserif"},
+ {"Pserif"},
+ {" symbol"},
+ {" screen"},
+ {"Bscreen"},
+ {" zapf dingbats"},
+#else
+ {" helvetica"},
+ {"Bhelvetica"},
+ {"Ihelvetica"},
+ {"Phelvetica"},
+ {" courier"},
+ {"Bcourier"},
+ {"Icourier"},
+ {"Pcourier"},
+ {" times"},
+ {"Btimes"},
+ {"Itimes"},
+ {"Ptimes"},
+ {" symbol"},
+ {" lucidatypewriter"},
+ {"Blucidatypewriter"},
+ {" zapf dingbats"},
+#endif
+};
+
+FL_EXPORT Fl_Fontdesc* fl_fonts = (Fl_Fontdesc*)built_in_table;
+
+#endif // ! USE_PANGO
+
static void fl_xft_font(Fl_Xlib_Graphics_Driver *driver, Fl_Font fnum, Fl_Fontsize size, int angle);
// For some reason Xft produces errors if you destroy a window whose id