[PATCH] fix handling of Type1 fonts without /FamilyName and/or /FullName

Stefan Dirsch sndirsch at suse.de
Thu Apr 21 14:58:14 UTC 2016


https://bugzilla.opensuse.org/show_bug.cgi?id=918466

Signed-off-by: Stefan Dirsch <sndirsch at suse.de>
---
 mkfontscale.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/mkfontscale.c b/mkfontscale.c
index da93e0c..e9b9488 100644
--- a/mkfontscale.c
+++ b/mkfontscale.c
@@ -579,11 +579,14 @@ makeXLFD(char *filename, FT_Face face, int isBitmap)
     }
 
     if(t1info) {
-        if(!family)
+        if(!family && t1info->family_name)
             family = strdup(t1info->family_name);
-        if(!family)
+        if(!family && t1info->full_name)
             family = strdup(t1info->full_name);
-        if(!full_name)
+        /* Hershey fonts miss /FamilyName */
+        if(!family && face->family_name)
+            family = strdup(face->family_name);
+        if(!full_name && t1info->full_name)
             full_name = strdup(t1info->full_name);
         if(!foundry)
             foundry = notice_foundry(t1info->notice);
-- 
2.6.2



More information about the xorg-devel mailing list