From: Ben Harris Date: Sun, 2 Jul 2017 16:56:24 +0000 (+0100) Subject: Half-width versions of fonts. X-Git-Tag: bedstead-001.003~23 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=fd5488c1a0acade8b1a20a431792ae4cb5067e6a;p=bedstead.git Half-width versions of fonts. These are intended to be used as double-height characters. --- diff --git a/Makefile b/Makefile index 80fa1a9..23973b9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -all: bedstead.otf bedstead-ext.otf sample.png title.png extended.png \ +all: bedstead.otf bedstead-ext.otf bedstead-con.otf bedstead-sem.otf \ + sample.png title.png extended.png \ bedstead-10-df.png bedstead-20-df.png bedstead.sfd: bedstead @@ -7,6 +8,12 @@ bedstead.sfd: bedstead bedstead-ext.sfd: bedstead ./bedstead --extended > bedstead-ext.sfd +bedstead-con.sfd: bedstead + ./bedstead --condensed > bedstead-con.sfd + +bedstead-sem.sfd: bedstead + ./bedstead --semicondensed > bedstead-sem.sfd + %.otf %-10.bdf %-20.bdf: %.sfd fontforge -lang=ff \ -c 'Open($$1); BitmapsAvail([10, 20]); Generate($$2, "bdf")' $< $@ diff --git a/bedstead.c b/bedstead.c index c21a520..83723ee 100644 --- a/bedstead.c +++ b/bedstead.c @@ -144,6 +144,18 @@ struct param extended_param = { 7, /* ttfwidth */ }; +struct param condensed_param = { + "Bedstead-Condensed", "Bedstead Condensed", + 50, /* xpix */ + 1, /* ttfwidth */ +}; + +struct param semicondensed_param = { + "Bedstead-Semicondensed", "Bedstead Semicondensed", + 62, /* xpix */ + 2, /* ttfwidth */ +}; + struct param *param = &default_param; /* Size of pixels in font design units (usually 1000/em) */ @@ -1205,6 +1217,12 @@ main(int argc, char **argv) if (strcmp(argv[1], "--extended") == 0) { param = &extended_param; argv++; argc--; + } else if (strcmp(argv[1], "--condensed") == 0) { + param = &condensed_param; + argv++; argc--; + } else if (strcmp(argv[1], "--semicondensed") == 0) { + param = &semicondensed_param; + argv++; argc--; } else if (strcmp(argv[1], "--") == 0) { argv++; argc--; break; @@ -1717,7 +1735,7 @@ emit_path() if (!started) printf("Fore\nSplineSet\n"); started = 1; do { - printf(" %.0f %.0f %s 1\n", + printf(" %g %g %s 1\n", (double)p->v.x / SCALE, (double)p->v.y / SCALE - 3*YPIX, p == &points[i] && p->next ? "m" : "l");