aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/fontsrv
diff options
context:
space:
mode:
authorXiao-Yong <jinxiaoyong@gmail.com>2018-11-13 22:13:15 -0600
committerRuss Cox <rsc@golang.org>2018-11-13 23:13:15 -0500
commitc82e11b24e7a6aa03473111367cb792ce0537f61 (patch)
tree627cf18aba68259c4902cd1c5665a6425ffc7477 /src/cmd/fontsrv
parent76b9347a5fa3a0970527c6ee1b97ef1c714f636b (diff)
downloadplan9port-c82e11b24e7a6aa03473111367cb792ce0537f61.tar.gz
plan9port-c82e11b24e7a6aa03473111367cb792ce0537f61.tar.bz2
plan9port-c82e11b24e7a6aa03473111367cb792ce0537f61.zip
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 (limited to 'src/cmd/fontsrv')
-rw-r--r--src/cmd/fontsrv/x11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/fontsrv/x11.c b/src/cmd/fontsrv/x11.c
index 455e8126..f93c031e 100644
--- a/src/cmd/fontsrv/x11.c
+++ b/src/cmd/fontsrv/x11.c
@@ -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;