Author: matt
Date: 2010-11-15 13:35:29 -0800 (Mon, 15 Nov 2010)
New Revision: 7853
Log:
Attempt at fixing the XFT problem. Will be testing on Linux shortly.
Modified:
branches/branch-1.1/src/fl_font_xft.cxx
Modified: branches/branch-1.1/src/fl_font_xft.cxx
===================================================================
--- branches/branch-1.1/src/fl_font_xft.cxx 2010-11-15 21:13:26 UTC (rev
7852)
+++ branches/branch-1.1/src/fl_font_xft.cxx 2010-11-15 21:35:29 UTC (rev
7853)
@@ -212,6 +212,19 @@
XftResult match_result; // the result of our matching attempt
// query the system to find a match for this font
match_pat = XftFontMatch(fl_display, fl_screen, fnt_pat, &match_result);
+ if (!match_pat) {
+ // last chance, just open any font in the right size
+ the_font = XftFontOpen (fl_display, fl_screen,
+ XFT_FAMILY, XftTypeString, "sans",
+ XFT_SIZE, XftTypeDouble, (double)fl_size_,
+ NULL);
+ XftPatternDestroy(fnt_pat);
+ if (!the_font) {
+ Fl::error("Unable to find fonts. Check your FontConfig
configuration.\n");
+ exit(1);
+ }
+ return the_font;
+ }
// open the matched font
the_font = XftFontOpenPattern(fl_display, match_pat);
// Tidy up the resources we allocated
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit