gdi32: FcPatternGet( FC_FILE ) only returns the basename as of fontconfig 2.3.92 .
FcPatternGetString( FC_FILE ) returns the whole path. Go figure.
This commit is contained in:
parent
2c7270e388
commit
0a01f37eb8
|
@ -150,7 +150,7 @@ MAKE_FUNCPTR(FcObjectSetCreate);
|
||||||
MAKE_FUNCPTR(FcObjectSetDestroy);
|
MAKE_FUNCPTR(FcObjectSetDestroy);
|
||||||
MAKE_FUNCPTR(FcPatternCreate);
|
MAKE_FUNCPTR(FcPatternCreate);
|
||||||
MAKE_FUNCPTR(FcPatternDestroy);
|
MAKE_FUNCPTR(FcPatternDestroy);
|
||||||
MAKE_FUNCPTR(FcPatternGet);
|
MAKE_FUNCPTR(FcPatternGetString);
|
||||||
#ifndef SONAME_LIBFONTCONFIG
|
#ifndef SONAME_LIBFONTCONFIG
|
||||||
#define SONAME_LIBFONTCONFIG "libfontconfig.so"
|
#define SONAME_LIBFONTCONFIG "libfontconfig.so"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1173,7 +1173,6 @@ static void load_fontconfig_fonts(void)
|
||||||
FcPattern *pat;
|
FcPattern *pat;
|
||||||
FcObjectSet *os;
|
FcObjectSet *os;
|
||||||
FcFontSet *fontset;
|
FcFontSet *fontset;
|
||||||
FcValue v;
|
|
||||||
int i, len;
|
int i, len;
|
||||||
const char *file, *ext;
|
const char *file, *ext;
|
||||||
|
|
||||||
|
@ -1193,7 +1192,7 @@ LOAD_FUNCPTR(FcObjectSetCreate);
|
||||||
LOAD_FUNCPTR(FcObjectSetDestroy);
|
LOAD_FUNCPTR(FcObjectSetDestroy);
|
||||||
LOAD_FUNCPTR(FcPatternCreate);
|
LOAD_FUNCPTR(FcPatternCreate);
|
||||||
LOAD_FUNCPTR(FcPatternDestroy);
|
LOAD_FUNCPTR(FcPatternDestroy);
|
||||||
LOAD_FUNCPTR(FcPatternGet);
|
LOAD_FUNCPTR(FcPatternGetString);
|
||||||
#undef LOAD_FUNCPTR
|
#undef LOAD_FUNCPTR
|
||||||
|
|
||||||
if(!pFcInit()) return;
|
if(!pFcInit()) return;
|
||||||
|
@ -1205,10 +1204,8 @@ LOAD_FUNCPTR(FcPatternGet);
|
||||||
fontset = pFcFontList(config, pat, os);
|
fontset = pFcFontList(config, pat, os);
|
||||||
if(!fontset) return;
|
if(!fontset) return;
|
||||||
for(i = 0; i < fontset->nfont; i++) {
|
for(i = 0; i < fontset->nfont; i++) {
|
||||||
if(pFcPatternGet(fontset->fonts[i], FC_FILE, 0, &v) != FcResultMatch)
|
if(pFcPatternGetString(fontset->fonts[i], FC_FILE, 0, (FcChar8**)&file) != FcResultMatch)
|
||||||
continue;
|
continue;
|
||||||
if(v.type != FcTypeString) continue;
|
|
||||||
file = (LPCSTR) v.u.s;
|
|
||||||
TRACE("fontconfig: %s\n", file);
|
TRACE("fontconfig: %s\n", file);
|
||||||
|
|
||||||
/* We're just interested in OT/TT fonts for now, so this hack just
|
/* We're just interested in OT/TT fonts for now, so this hack just
|
||||||
|
|
Loading…
Reference in New Issue