#include <string.h>
#include <time.h>
+#define FAMILY_NAME "Bedstead"
#define VERSION "002.009"
/* Metrics expressed in pixels. */
#define FULLNAME_MAX 100
static char fullname[FULLNAME_MAX];
- sprintf(fullname, "Bedstead%s%s", weight->suffix, width->suffix);
+ sprintf(fullname, FAMILY_NAME "%s%s", weight->suffix, width->suffix);
return fullname;
}
if ((weight->ttfweight == 500 || weight->ttfweight == 700) &&
width->suffix[0] == '\0') {
/* Normal width; regular or bold */
- NAME(1, "Bedstead");
+ NAME(1, FAMILY_NAME);
NAME(2, weight->suffix[0] ? weight->suffix + 1 : "Regular");
} else {
/*
* Slightly unusual face, so we need to set the
* "Preferred" family and style.
*/
- NAMEF(1, "Bedstead%s%s",
+ NAMEF(1, FAMILY_NAME "%s%s",
weight->ttfweight == 700 ? "" : weight->suffix,
width->suffix);
NAME(2,
weight->ttfweight == 700 ? weight->suffix+1 : "Regular");
- NAME(16, "Bedstead");
+ NAME(16, FAMILY_NAME);
NAMEF(17, "%s%s", weight->suffix[0] ? weight->suffix+1 : "",
weight->suffix[0] ? width->suffix :
width->suffix[0] ? width->suffix+1 : "");
TTXS("version", VERSION);
TTXS("Notice", "Dedicated to the public domain");
TTXS("FullName", get_fullname());
- TTXS("FamilyName", "Bedstead");
+ TTXS("FamilyName", FAMILY_NAME);
TTXS("Weight", *weight->suffix ? weight->suffix + 1 : "Medium");
TTXI("isFixedPitch", 1);
TTXI("UnderlinePosition", -3 * YPIX / 2);
qsort(sorted, nglyphs, sizeof(sorted[0]), &byunicode);
printf("%%!PS-Adobe\n");
printf("%%%%Creator: bedstead\n");
- printf("%%%%Title: Bedstead Glyph Complement\n");
- printf("/xfont /Bedstead findfont 20 scalefont def\n");
- printf("/nfont /Bedstead findfont 10 scalefont def\n");
- printf("/lfont /Bedstead findfont 4 scalefont def\n");
+ printf("%%%%Title: %s Glyph Complement\n", FAMILY_NAME);
+ printf("/xfont /%s findfont 20 scalefont def\n", FAMILY_NAME);
+ printf("/nfont /%s findfont 10 scalefont def\n", FAMILY_NAME);
+ printf("/lfont /%s findfont 4 scalefont def\n", FAMILY_NAME);
printf("/str 50 string def\n");
printf("/centre {\n");
printf(" dup stringwidth pop 2 div neg 0 rmoveto show\n");
printf("/buf %d string def\n", (px_width + 7) / 8);
printf("(\\\n");
printf("STARTFONT 2.1\n");
- printf("FONT -bjh21-Bedstead-%s-R-%s--"
- "%d-%d-75-75-C-%d-ISO10646-1\n",
+ printf("FONT -bjh21-%s-%s-R-%s--"
+ "%d-%d-75-75-C-%d-ISO10646-1\n", FAMILY_NAME,
*weight->suffix ? weight->suffix + 1 : "Medium",
*width->suffix ? width->suffix + 1 : "Normal",
dpt_height, px_height, px_width * 10);
printf("FONTBOUNDINGBOX %d %d 0 %d\n", px_width, px_height, -base);
printf("STARTPROPERTIES 23\n");
printf("FOUNDRY \"bjh21\"\n");
- printf("FAMILY_NAME \"Bedstead\"\n");
+ printf("FAMILY_NAME \"%s\"\n", FAMILY_NAME);
printf("WEIGHT_NAME \"%s\"\n",
*weight->suffix ? weight->suffix + 1 : "Medium");
printf("SLANT \"R\"\n");