mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 20:06:18 +08:00
Fixed handling of missing fonts in Xft (STR #2355)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7855 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
CHANGES IN FLTK 1.3.0
|
CHANGES IN FLTK 1.3.0
|
||||||
|
|
||||||
|
- Fixed handling of missing fonts in Xft (STR #2355)
|
||||||
- Added alternative Xft font names (STR #2215)
|
- Added alternative Xft font names (STR #2215)
|
||||||
- Update lib png access (STR #2442)
|
- Update lib png access (STR #2442)
|
||||||
- Fixed OpenGL hide/show issue in OS X (STR #2260)
|
- Fixed OpenGL hide/show issue in OS X (STR #2260)
|
||||||
|
|||||||
@@ -289,6 +289,20 @@ static XftFont* fontopen(const char* name, bool core, int angle) {
|
|||||||
free(picked_name);
|
free(picked_name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
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
|
// open the matched font
|
||||||
the_font = XftFontOpenPattern(fl_display, match_pat);
|
the_font = XftFontOpenPattern(fl_display, match_pat);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user