diff --git a/bedstead.c b/bedstead.c index c2b89d4..4079ca3 100644 --- a/bedstead.c +++ b/bedstead.c @@ -2196,14 +2196,25 @@ 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\" \"\" \"\" \"\" " - "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" " - "\"%s\" \"%s%s\"\n\n", weight->suffix, width->suffix, - "Regular", - weight->suffix[0] || width->suffix[0] ? "Bedstead" : "", - weight->suffix[0] ? weight->suffix+1 : "", - weight->suffix[0] ? width->suffix : - width->suffix[0] ? width->suffix+1 : ""); + if ((weight->ttfweight == 500 || weight->ttfweight == 700) && + width->suffix[0] == '\0') + /* Normal width; regular or bold */ + printf("LangName: 1033 \"\" \"Bedstead\" \"%s\"\n", + weight->suffix[0] ? weight->suffix + 1 : "Regular"); + else + /* + * Slightly unusual face, so we need to set the + * "Preferred" family and style. + */ + printf("LangName: 1033 \"\" \"Bedstead%s%s\" \"%s\" \"\" \"\" " + "\"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" \"\" " + "\"\" \"Bedstead\" \"%s%s\"\n", + weight->ttfweight == 700 ? "" : weight->suffix, + width->suffix, + weight->ttfweight == 700 ? weight->suffix+1 : "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");