bedstead-boldcondensed bedstead-boldextracondensed \
bedstead-boldultracondensed
-SFDFILES = $(addsuffix .sfd, $(FONTBASES))
+TTXFILES = $(addsuffix .ttx, $(FONTBASES))
OTFFILES = $(addsuffix .otf, $(FONTBASES))
DISTFILES = bedstead.c Makefile CONTRIBUTING COPYING HACKING NEWS \
bedstead-plotter-light.otf bedstead-plotter-medium.otf \
bedstead-plotter-bold.otf plotter.png
-bedstead.sfd: bedstead
- ./bedstead > bedstead.sfd
+bedstead.ttx: bedstead
+ ./bedstead > bedstead.ttx
-bedstead-extended.sfd: bedstead
- ./bedstead --extended > bedstead-extended.sfd
+bedstead-extended.ttx: bedstead
+ ./bedstead --extended > bedstead-extended.ttx
-bedstead-semicondensed.sfd: bedstead
- ./bedstead --semi-condensed > bedstead-semicondensed.sfd
+bedstead-semicondensed.ttx: bedstead
+ ./bedstead --semi-condensed > bedstead-semicondensed.ttx
-bedstead-condensed.sfd: bedstead
- ./bedstead --condensed > bedstead-condensed.sfd
+bedstead-condensed.ttx: bedstead
+ ./bedstead --condensed > bedstead-condensed.ttx
-bedstead-extracondensed.sfd: bedstead
- ./bedstead --extra-condensed > bedstead-extracondensed.sfd
+bedstead-extracondensed.ttx: bedstead
+ ./bedstead --extra-condensed > bedstead-extracondensed.ttx
-bedstead-ultracondensed.sfd: bedstead
- ./bedstead --ultra-condensed > bedstead-ultracondensed.sfd
+bedstead-ultracondensed.ttx: bedstead
+ ./bedstead --ultra-condensed > bedstead-ultracondensed.ttx
-bedstead-bold.sfd: bedstead
- ./bedstead --bold > bedstead-bold.sfd
+bedstead-bold.ttx: bedstead
+ ./bedstead --bold > bedstead-bold.ttx
-bedstead-boldextended.sfd: bedstead
- ./bedstead --bold --extended > bedstead-boldextended.sfd
+bedstead-boldextended.ttx: bedstead
+ ./bedstead --bold --extended > bedstead-boldextended.ttx
-bedstead-boldsemicondensed.sfd: bedstead
- ./bedstead --bold --semi-condensed > bedstead-boldsemicondensed.sfd
+bedstead-boldsemicondensed.ttx: bedstead
+ ./bedstead --bold --semi-condensed > bedstead-boldsemicondensed.ttx
-bedstead-boldcondensed.sfd: bedstead
- ./bedstead --bold --condensed > bedstead-boldcondensed.sfd
+bedstead-boldcondensed.ttx: bedstead
+ ./bedstead --bold --condensed > bedstead-boldcondensed.ttx
-bedstead-boldextracondensed.sfd: bedstead
- ./bedstead --bold --extra-condensed > bedstead-boldextracondensed.sfd
+bedstead-boldextracondensed.ttx: bedstead
+ ./bedstead --bold --extra-condensed > bedstead-boldextracondensed.ttx
-bedstead-boldultracondensed.sfd: bedstead
- ./bedstead --bold --ultra-condensed > bedstead-boldultracondensed.sfd
+bedstead-boldultracondensed.ttx: bedstead
+ ./bedstead --bold --ultra-condensed > bedstead-boldultracondensed.ttx
-bedstead-oc.sfd: bedstead
- ./bedstead --plotter > bedstead-oc.sfd
+bedstead-oc.ttx: bedstead
+ ./bedstead --plotter > bedstead-oc.ttx
-bedstead-plotter-%.sfd: strokefont.py bedstead-oc.sfd
- fontforge -lang=py -script strokefont.py plotter-$* bedstead-oc.sfd \
- bedstead-plotter-$*.sfd
+bedstead-plotter-%.ttx: strokefont.py bedstead-oc.ttx
+ fontforge -lang=py -script strokefont.py plotter-$* bedstead-oc.ttx \
+ bedstead-plotter-$*.ttx
-bedstead-chiseltip.sfd: strokefont.py bedstead-oc.sfd
- fontforge -lang=py -script strokefont.py chiseltip bedstead-oc.sfd \
- bedstead-chiseltip.sfd
+bedstead-chiseltip.ttx: strokefont.py bedstead-oc.ttx
+ fontforge -lang=py -script strokefont.py chiseltip bedstead-oc.ttx \
+ bedstead-chiseltip.ttx
bedstead-%.bdf.ps: bedstead
./bedstead --bdfgen $* > $@
%.bdf: %.bdf.ps $(OTFFILES) Fontmap
gs -q -P -dSAFER -dNODISPLAY -dBATCH $< > $@
-%.otf: %.sfd
- fontforge -lang=ff \
- -c 'Open($$1); Generate($$2)' \
- $< $*.otf
+%.otf: %.ttx
+ ttx -o $@ $<
%.png: %.ps $(OTFFILES) Fontmap
gs -P -q -dSAFER -sDEVICE=png16m -dTextAlphaBits=4 -o $@ $<
.PHONY: clean
clean:
- rm -f bedstead *.sfd *.otf *.bdf *.bdf.ps *.png *.pdf \
+ rm -f bedstead *.ttx *.otf *.bdf *.bdf.ps *.png *.pdf \
bedstead-complement.ps
.PHONY: install-user
for (i = 0; i < nglyphs; i++)
if (glyphs[i].unicode == -1)
extraglyphs++;
- printf("SplineFontDB: 3.0\n");
- printf("FontName: %s\n", fullname_to_fontname(get_fullname()));
- printf("FullName: %s\n", get_fullname());
- printf("FamilyName: Bedstead\n");
- 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");
- printf("Version: 002.009\n");
- printf("ItalicAngle: 0\n");
- printf("UnderlinePosition: %g\n", (double)(-3 * YPIX / 2));
- printf("UnderlineWidth: %g\n", (double)(YPIX));
- printf("OS2StrikeYPos: %d\n", (int)(3 * YPIX));
- printf("OS2StrikeYSize: %d\n", (int)(YPIX));
- printf("Ascent: %g\n", (double)(8 * YPIX));
- printf("Descent: %g\n", (double)(2 * YPIX));
- /* Sub/Superscript are three by five pixels */
- printf("OS2SubXSize: %d\n", (int)(YSIZE * YPIX * 3 / (XSIZE - 1)));
- printf("OS2SupXSize: %d\n", (int)(YSIZE * YPIX * 3 / (XSIZE - 1)));
- printf("OS2SubYSize: %d\n", (int)(YSIZE * YPIX * 5 / (YSIZE - 3)));
- printf("OS2SupYSize: %d\n", (int)(YSIZE * YPIX * 5 / (YSIZE - 3)));
- printf("OS2SubXOff: 0\n");
- printf("OS2SupXOff: 0\n");
- printf("OS2SubYOff: %d\n", (int)(2 * YPIX));
- printf("OS2SupYOff: %d\n", (int)(2 * YPIX));
- printf("FSType: 0\n");
- printf("TTFWeight: %d\n", weight->ttfweight);
- printf("TTFWidth: %d\n", width->ttfwidth);
- dopanose();
- printf("OS2Vendor: 'PfEd'\n");
- printf("OS2FamilyClass: %d\n", 0x080a);
- printf("LayerCount: 2\n");
- printf("Layer: 0 0 \"Back\" 1\n");
- printf("Layer: 1 0 \"Fore\" 0\n");
- printf("Encoding: UnicodeFull\n");
- printf("NameList: Adobe Glyph List\n");
- printf("DisplaySize: -24\n");
- printf("AntiAlias: 1\n");
- printf("FitToEm: 1\n");
- if (plottermode) {
- printf("StrokedFont: 1\n");
- printf("StrokeWidth: 50\n");
- }
- printf("BeginPrivate: 5\n");
- printf(" StdHW 6 [%4g]\n", (double)YPIX);
- printf(" StdVW 6 [%4g]\n",
- (double)(XPIX * (100 + weight->weight) / 100));
- printf(" BlueValues 35 [0 0 %4g %4g %4g %4g %4g %4g]\n",
- (double)(YPIX * 5), (double)(YPIX * 5),
- (double)(YPIX * 6), (double)(YPIX * 6),
- (double)(YPIX * 7), (double)(YPIX * 7));
- printf(" OtherBlues 21 [%4g %4g %4g %4g]\n",
- (double)(YPIX * -2), (double)(YPIX * -2),
- (double)(YPIX * 1), (double)(YPIX * 1));
- printf(" BlueFuzz 1 0\n");
- printf("EndPrivate\n");
- printf("Lookup: 3 0 0 \"aalt: all alternates\" {\"aalt\"} "
- "['aalt' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("Lookup: 1 0 0 \"smcp: lower-case to small caps\" "
- "{\"smcp\" (\"sc\")} "
- "['smcp' ('latn' <'dflt'>)]\n");
- printf("Lookup: 1 0 0 \"c2sc: upper-case to small caps\" "
- "{\"c2sc\" (\"c2sc\")} "
- "['c2sc' ('latn' <'dflt'>)]\n");
- printf("Lookup: 1 0 0 \"rtlm: right-to-left mirrored forms\" "
- "{\"rtlm\" (\"rtlm\")} "
- "['rtlm' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("Lookup: 1 0 0 \"ss01: SAA5051 forms\" {\"ss01\" (\"saa5051\")} "
- "['ss01' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("OtfFeatName: 'ss01' 1033 \"SAA5051\"\n");
- printf("Lookup: 1 0 0 \"ss02: SAA5052 forms\" {\"ss02\" (\"saa5052\")} "
- "['ss02' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("OtfFeatName: 'ss02' 1033 \"SAA5052\"\n");
- printf("Lookup: 1 0 0 \"ss04: SAA5054 forms\" {\"ss04\" (\"saa5054\")} "
- "['ss04' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("OtfFeatName: 'ss04' 1033 \"SAA5054\"\n");
- printf("Lookup: 1 0 0 \"ss14: 4-cell separated graphics\" "
- "{\"ss14\" (\"sep4\")} "
- "['ss14' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("OtfFeatName: 'ss14' 1033 \"4-cell separated graphics\"\n");
- printf("Lookup: 1 0 0 \"ss16: 6-cell separated graphics\" "
- "{\"ss16\" (\"sep6\")} "
- "['ss16' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("OtfFeatName: 'ss16' 1033 \"6-cell separated graphics\"\n");
- printf("Lookup: 257 0 0 \"palt: proportional metrics\" {\"palt\"} "
- "['palt' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n");
- printf("BeginChars: %ld %d\n", 0x110000L + extraglyphs, nglyphs);
+ printf("<?xml version='1.0'?>\n");
+ printf("<ttFont sfntVersion='OTTO'>\n");
+ /* printf("FontName: %s\n", fullname_to_fontname(get_fullname())); */
+ /* printf("FullName: %s\n", get_fullname()); */
+ /* printf("FamilyName: Bedstead\n"); */
+ /* 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"); */
+ /* printf("Version: 002.009\n"); */
+ /* printf("ItalicAngle: 0\n"); */
+ /* printf("UnderlinePosition: %g\n", (double)(-3 * YPIX / 2)); */
+ /* printf("UnderlineWidth: %g\n", (double)(YPIX)); */
+ /* printf("OS2StrikeYPos: %d\n", (int)(3 * YPIX)); */
+ /* printf("OS2StrikeYSize: %d\n", (int)(YPIX)); */
+ /* printf("Ascent: %g\n", (double)(8 * YPIX)); */
+ /* printf("Descent: %g\n", (double)(2 * YPIX)); */
+ /* /\* Sub/Superscript are three by five pixels *\/ */
+ /* printf("OS2SubXSize: %d\n", (int)(YSIZE * YPIX * 3 / (XSIZE - 1))); */
+ /* printf("OS2SupXSize: %d\n", (int)(YSIZE * YPIX * 3 / (XSIZE - 1))); */
+ /* printf("OS2SubYSize: %d\n", (int)(YSIZE * YPIX * 5 / (YSIZE - 3))); */
+ /* printf("OS2SupYSize: %d\n", (int)(YSIZE * YPIX * 5 / (YSIZE - 3))); */
+ /* printf("OS2SubXOff: 0\n"); */
+ /* printf("OS2SupXOff: 0\n"); */
+ /* printf("OS2SubYOff: %d\n", (int)(2 * YPIX)); */
+ /* printf("OS2SupYOff: %d\n", (int)(2 * YPIX)); */
+ /* printf("FSType: 0\n"); */
+ /* printf("TTFWeight: %d\n", weight->ttfweight); */
+ /* printf("TTFWidth: %d\n", width->ttfwidth); */
+ /* dopanose(); */
+ /* printf("OS2Vendor: 'PfEd'\n"); */
+ /* printf("OS2FamilyClass: %d\n", 0x080a); */
+ /* printf("LayerCount: 2\n"); */
+ /* printf("Layer: 0 0 \"Back\" 1\n"); */
+ /* printf("Layer: 1 0 \"Fore\" 0\n"); */
+ /* printf("Encoding: UnicodeFull\n"); */
+ /* printf("NameList: Adobe Glyph List\n"); */
+ /* printf("DisplaySize: -24\n"); */
+ /* printf("AntiAlias: 1\n"); */
+ /* printf("FitToEm: 1\n"); */
+ /* if (plottermode) { */
+ /* printf("StrokedFont: 1\n"); */
+ /* printf("StrokeWidth: 50\n"); */
+ /* } */
+ /* printf("BeginPrivate: 5\n"); */
+ /* printf(" StdHW 6 [%4g]\n", (double)YPIX); */
+ /* printf(" StdVW 6 [%4g]\n", */
+ /* (double)(XPIX * (100 + weight->weight) / 100)); */
+ /* printf(" BlueValues 35 [0 0 %4g %4g %4g %4g %4g %4g]\n", */
+ /* (double)(YPIX * 5), (double)(YPIX * 5), */
+ /* (double)(YPIX * 6), (double)(YPIX * 6), */
+ /* (double)(YPIX * 7), (double)(YPIX * 7)); */
+ /* printf(" OtherBlues 21 [%4g %4g %4g %4g]\n", */
+ /* (double)(YPIX * -2), (double)(YPIX * -2), */
+ /* (double)(YPIX * 1), (double)(YPIX * 1)); */
+ /* printf(" BlueFuzz 1 0\n"); */
+ /* printf("EndPrivate\n"); */
+ /* printf("Lookup: 3 0 0 \"aalt: all alternates\" {\"aalt\"} " */
+ /* "['aalt' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n"); */
+ /* printf("Lookup: 1 0 0 \"smcp: lower-case to small caps\" " */
+ /* "{\"smcp\" (\"sc\")} " */
+ /* "['smcp' ('latn' <'dflt'>)]\n"); */
+ /* printf("Lookup: 1 0 0 \"c2sc: upper-case to small caps\" " */
+ /* "{\"c2sc\" (\"c2sc\")} " */
+ /* "['c2sc' ('latn' <'dflt'>)]\n"); */
+ /* printf("Lookup: 1 0 0 \"rtlm: right-to-left mirrored forms\" " */
+ /* "{\"rtlm\" (\"rtlm\")} " */
+ /* "['rtlm' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n"); */
+ /* printf("Lookup: 1 0 0 \"ss01: SAA5051 forms\" {\"ss01\" (\"saa5051\")} " */
+ /* "['ss01' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n"); */
+ /* printf("OtfFeatName: 'ss01' 1033 \"SAA5051\"\n"); */
+ /* printf("Lookup: 1 0 0 \"ss02: SAA5052 forms\" {\"ss02\" (\"saa5052\")} " */
+ /* "['ss02' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n"); */
+ /* printf("OtfFeatName: 'ss02' 1033 \"SAA5052\"\n"); */
+ /* printf("Lookup: 1 0 0 \"ss04: SAA5054 forms\" {\"ss04\" (\"saa5054\")} " */
+ /* "['ss04' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n"); */
+ /* printf("OtfFeatName: 'ss04' 1033 \"SAA5054\"\n"); */
+ /* printf("Lookup: 1 0 0 \"ss14: 4-cell separated graphics\" " */
+ /* "{\"ss14\" (\"sep4\")} " */
+ /* "['ss14' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n"); */
+ /* printf("OtfFeatName: 'ss14' 1033 \"4-cell separated graphics\"\n"); */
+ /* printf("Lookup: 1 0 0 \"ss16: 6-cell separated graphics\" " */
+ /* "{\"ss16\" (\"sep6\")} " */
+ /* "['ss16' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n"); */
+ /* printf("OtfFeatName: 'ss16' 1033 \"6-cell separated graphics\"\n"); */
+ /* printf("Lookup: 257 0 0 \"palt: proportional metrics\" {\"palt\"} " */
+ /* "['palt' ('DFLT' <'dflt'> 'latn' <'dflt'>)]\n"); */
+ /* printf("BeginChars: %ld %d\n", 0x110000L + extraglyphs, nglyphs); */
extraglyphs = 0;
for (i = 0; i < nglyphs; i++)
glyphs_by_name[i] = glyphs + i;
qsort(glyphs_by_name, nglyphs, sizeof(glyphs_by_name[0]),
&compare_glyphs_by_name);
for (i = 0; i < nglyphs; i++) {
- printf("\nStartChar: %s\n", glyphs[i].name);
- printf("Encoding: %ld %ld %d\n",
- (long)(glyphs[i].unicode != -1 ? glyphs[i].unicode :
- 0x110000 + extraglyphs++),
- (long)glyphs[i].unicode, i);
- printf("Width: %g\n", (double)(XSIZE * XPIX));
- if (glyphs[i].flags & (MOS6|MOS4))
- printf("Flags: W\n");
- else
- printf("Flags: HW\n");
- printf("LayerCount: 2\n");
- dolookups(&glyphs[i]);
- if (glyphs[i].flags & IS_ALIAS)
- doalias(glyphs[i].alias_of);
- else if (glyphs[i].flags & MOS6)
- domosaic(glyphs[i].data[0],
- (glyphs[i].flags & SEP) != 0);
- else if (glyphs[i].flags & MOS4)
- domosaic4(glyphs[i].data[0],
- (glyphs[i].flags & SEP) != 0);
- else {
- if (plottermode)
- dochar_plotter(glyphs[i].data, glyphs[i].flags);
- else
- dochar(glyphs[i].data, glyphs[i].flags);
- }
- printf("EndChar\n");
+ /* printf("\nStartChar: %s\n", glyphs[i].name); */
+ /* printf("Encoding: %ld %ld %d\n", */
+ /* (long)(glyphs[i].unicode != -1 ? glyphs[i].unicode : */
+ /* 0x110000 + extraglyphs++), */
+ /* (long)glyphs[i].unicode, i); */
+ /* printf("Width: %g\n", (double)(XSIZE * XPIX)); */
+ /* if (glyphs[i].flags & (MOS6|MOS4)) */
+ /* printf("Flags: W\n"); */
+ /* else */
+ /* printf("Flags: HW\n"); */
+ /* printf("LayerCount: 2\n"); */
+ /* dolookups(&glyphs[i]); */
+ /* if (glyphs[i].flags & IS_ALIAS) */
+ /* doalias(glyphs[i].alias_of); */
+ /* else if (glyphs[i].flags & MOS6) */
+ /* domosaic(glyphs[i].data[0], */
+ /* (glyphs[i].flags & SEP) != 0); */
+ /* else if (glyphs[i].flags & MOS4) */
+ /* domosaic4(glyphs[i].data[0], */
+ /* (glyphs[i].flags & SEP) != 0); */
+ /* else { */
+ /* if (plottermode) */
+ /* dochar_plotter(glyphs[i].data, glyphs[i].flags); */
+ /* else */
+ /* dochar(glyphs[i].data, glyphs[i].flags); */
+ /* } */
+ /* printf("EndChar\n"); */
}
- printf("EndChars\n");
- printf("EndSplineFont\n");
+ /* printf("EndChars\n"); */
+ printf("</ttFont>\n");
return EXIT_SUCCESS;
}