diff options
author | Christopher Zimmermann <madroach@gmerlin.de> | 2020-06-15 14:08:49 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-09-22 22:00:38 +0000 |
commit | 1df352c9e862686692ac053b838d76a36d721805 (patch) | |
tree | f80387d297a2d21443b0c8df880f5621b7b7ba4d | |
parent | 8532812f1eddfadc0bcfad220b283bf5990bba10 (diff) |
truncate foundry if there is no known abbreviation.
Honestly I have no idea why the foundry needs to fit in four bytes.
But anyway truncation might indeed be better then "UNKN" ?
Anyone more knowledgeable than me out there?
-rw-r--r-- | util.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -280,8 +280,11 @@ faceFoundry(FT_Face face) return makeName("URW "); else if(strcasecmp(prop.u.atom, "y&y") == 0) return makeName("Y&Y "); - else - return makeName("UNKN"); + else { + char buf[5]; + snprintf(buf, sizeof(buf), "%-4s", prop.u.atom); + return makeName(buf); + } } /* For now */ return makeName("UNKN"); |