fontsrv: x11 uses FC_POSTSCRIPT_NAME (#174)

This makes fontsrv use the PostScript font names on X11.
The PostScript font names contains only alphanumeric and
hyphens.  This allows us to use the Font command in acme.
It also matches the font names used by fontsrv on macOS,
which has been using PostScript font names.
This commit is contained in:
Xiao-Yong 2018-11-13 22:13:15 -06:00 committed by Russ Cox
parent 76b9347a5f
commit c82e11b24e

View file

@ -40,7 +40,7 @@ loadfonts(void)
int index;
FcPattern *pat = sysfonts->fonts[i];
if(FcPatternGetString(pat, FC_FULLNAME, 0, &fullname) != FcResultMatch ||
if(FcPatternGetString(pat, FC_POSTSCRIPT_NAME, 0, &fullname) != FcResultMatch ||
FcPatternGetString(pat, FC_FILE, 0, &fontfile) != FcResultMatch ||
FcPatternGetInteger(pat, FC_INDEX, 0, &index) != FcResultMatch)
continue;