tfontsrv: x11 uses FC_POSTSCRIPT_NAME (#174) - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit c82e11b24e7a6aa03473111367cb792ce0537f61
parent 76b9347a5fa3a0970527c6ee1b97ef1c714f636b
Author: Xiao-Yong 
Date:   Tue, 13 Nov 2018 22:13:15 -0600

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.
Diffstat:
  M src/cmd/fontsrv/x11.c               |       2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/cmd/fontsrv/x11.c b/src/cmd/fontsrv/x11.c
t@@ -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;