fail more gracefully when no Xft fonts are available at run-time

svn: r3506
This commit is contained in:
Matthew Flatt 2006-06-27 18:43:23 +00:00
parent 3ac85ef0ec
commit 2f5fde3248

View File

@ -771,6 +771,7 @@ static wxFontStruct *wxLoadQueryNearestAAFont(const char *name,
XftResult res;
pat = XftNameParse(name XFORM_OK_PLUS 1);
if (!pat) return NULL;
pat = XftPatternBuild(pat,
(sip ? XFT_PIXEL_SIZE : XFT_SIZE), XftTypeInteger, point_size,
@ -781,6 +782,7 @@ static wxFontStruct *wxLoadQueryNearestAAFont(const char *name,
NULL);
pat = XftFontMatch(wxAPP_DISPLAY, DefaultScreen(wxAPP_DISPLAY), pat, &res);
if (!pat) return NULL;
if (use_rot) {
/* We add a transform after match, because Xft/fontconfig