chiark / gitweb /
Better TTF name generation.
authorBen Harris <bjh21@bjh21.me.uk>
Mon, 7 Aug 2017 22:37:17 +0000 (23:37 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Mon, 7 Aug 2017 22:37:17 +0000 (23:37 +0100)
Now more-correctly generate family/subfamily names, both the versions
for programs that can't handle much variety (IDs 1 and 2), and the
proper typographic ones (IDs 16 and 17).  This should stop "Medium"
turning up in my font selector.

bedstead.c

index 2bbddc82b64fac89c9eb5ac4ccfdcaa7a60d9d56..540b6eb279bc0b1a289b4de239cc1fa3e557d5c6 100644 (file)
@@ -1476,6 +1476,13 @@ main(int argc, char **argv)
        printf("FontName: %s\n", fullname_to_fontname(get_fullname()));
        printf("FullName: %s\n", get_fullname());
        printf("FamilyName: Bedstead\n");
+       printf("LangName: 1033 \"\" \"Bedstead%s%s\" \"%s\" \"\" \"\" \"\" "
+              "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" "
+              "\"Bedstead\" \"%s%s\"\n\n", weight->suffix, width->suffix,
+              "Regular",
+              weight->suffix[0] ? weight->suffix+1 : "",
+              weight->suffix[0] ? width->suffix :
+              width->suffix[0] ? width->suffix+1 : "");
        printf("Weight:%s\n", weight->suffix[0] ? weight->suffix : " Medium");
        printf("OS2_WeightWidthSlopeOnly: 1\n");
        printf("Copyright: Dedicated to the public domain\n");