chiark / gitweb /
Minimal infrastructure for going via TTX rather than SFD
authorBen Harris <bjh21@bjh21.me.uk>
Sat, 2 Nov 2024 08:46:28 +0000 (08:46 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Thu, 14 Nov 2024 22:27:18 +0000 (22:27 +0000)
bedstead.c outputs an utterly minimal TTX file containing no tables, and
TTX compiles it into a similarly minimal OTF.  Which Ghostscript then
complains about.

FontForge is an impressive application, but it's not well-suited to
being part of a mechanical font-production pipeline.  The SFD format is
weird and rather difficult to generate, and FontForge imposes rather
more of its own opinions on the output than I'd like.

TTX is a lower-level format, and while it's a little bit weird, most of
it's weirdness comes from being a faithful representation of the
structure of an OpenType font.  Ideally I'd like something a little
higher-level, but a format that's too low-level is much easier to work
with than one that's too high-level.  The obvious alternative is UFO,
which is very popular but looks like being a pain to generate from plain
C.

Looking to the future, I like the idea of a variable version of
Bedstead, and neither SFD nor UFO seems to support that very well.  In
UFO's case, it seems that the convention is to create UFOs at various
points in the design space and then have a tool interpolate between
them, which seems wrong when they're all procedurally generated from the
same source.  TTX will allow me to directly generate the variation
tables, if I can understand how they work.

Makefile
bedstead.c

index b4ebc1a72485da6823e3ec1df828705b1fb1ae3b..d4738f5f0c47de49d678ab1e5a829b5e1586edfe 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ FONTBASES = bedstead bedstead-extended bedstead-semicondensed \
             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 \
@@ -27,52 +27,52 @@ experimental: bedstead-chiseltip.otf bedstead-plotter-thin.otf \
  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 $* > $@
@@ -85,10 +85,8 @@ bedstead-bold-%.bdf.ps: bedstead
 %.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 $@ $<
@@ -107,7 +105,7 @@ bedstead-complement.pdf: bedstead-complement.ps bedstead.otf Fontmap
 
 .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
index d7379e954289a975b0ba786dc9d45ca8c2105c91..f44517d891a854a6c939c3407563d10848e06b16 100644 (file)
@@ -2814,147 +2814,148 @@ main(int argc, char **argv)
        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;
 }