From 60623134213e7cd928b0d8ac07c1c0ab3d0d19a2 Mon Sep 17 00:00:00 2001
From: Ben Harris
Date: Sat, 15 Jul 2017 23:22:14 +0100
Subject: [PATCH] Comprehensive rework of widths. Now there are six.
The names of the widths now track those in the OpenType 'OS/2' table, so
the former condensed and semicondensed are now ultra-condensed and
extra-condensed, and there are new condensed and semi-condensed widths
to fill the gaps. Also, the fonts are named more consistently with
Adobe's practice: "Bedstead Semi Condensed" and so forth.
The new Bedstead Condensed makes a pretty decent terminal font, which is
a nice side-effect.
---
Makefile | 49 ++++++++++++++++++++++++++++----------------
bedstead.c | 32 ++++++++++++++++++++---------
bedstead.css | 29 ++++++++++++++++++++++++--
extended.ps | 12 +++++------
index.xhtml | 58 ++++++++++++++++++++++++++++++++--------------------
5 files changed, 122 insertions(+), 58 deletions(-)
diff --git a/Makefile b/Makefile
index 3bb5fd8..f89376d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,40 @@
-all: bedstead.otf bedstead-ext.otf bedstead-con.otf bedstead-sem.otf \
+FONTBASES = bedstead bedstead-extended bedstead-semicondensed \
+ bedstead-condensed bedstead-extracondensed bedstead-ultracondensed
+
+SFDFILES = $(addsuffix .sfd, $(FONTBASES))
+OTFFILES = $(addsuffix .otf, $(FONTBASES))
+PFAFILES = $(addsuffix .pfa, $(FONTBASES))
+AFMFILES = $(addsuffix .afm, $(FONTBASES))
+
+FONTFILES = $(SFDFILES) $(OTFFILES) $(PFAFILES) $(AFMFILES)
+
+DISTFILES = bedstead.c Makefile COPYING \
+ $(FONTFILES) \
+ bedstead-10.bdf bedstead-20.bdf \
+ bedstead-10-df.png bedstead-20-df.png
+
+all: $(DISTFILES) \
sample.png title.png extended.png \
bedstead-10-df.png bedstead-20-df.png
bedstead.sfd: bedstead
./bedstead > bedstead.sfd
-bedstead-ext.sfd: bedstead
- ./bedstead --extended > bedstead-ext.sfd
+bedstead-extended.sfd: bedstead
+ ./bedstead --extended > bedstead-extended.sfd
-bedstead-con.sfd: bedstead
- ./bedstead --condensed > bedstead-con.sfd
+bedstead-semicondensed.sfd: bedstead
+ ./bedstead --semi-condensed > bedstead-semicondensed.sfd
+
+bedstead-condensed.sfd: bedstead
+ ./bedstead --condensed > bedstead-condensed.sfd
+
+bedstead-extracondensed.sfd: bedstead
+ ./bedstead --extra-condensed > bedstead-extracondensed.sfd
+
+bedstead-ultracondensed.sfd: bedstead
+ ./bedstead --ultra-condensed > bedstead-ultracondensed.sfd
-bedstead-sem.sfd: bedstead
- ./bedstead --semicondensed > bedstead-sem.sfd
%.otf %-10.bdf %-20.bdf: %.sfd
fontforge -lang=ff \
@@ -21,10 +43,9 @@ bedstead-sem.sfd: bedstead
%.pfa %.afm: %.sfd
fontforge -lang=ff -c 'Open($$1); Generate($$2)' $< $@
-%.png: %.ps bedstead.pfa bedstead-ext.pfa bedstead-con.pfa bedstead-sem.pfa
+%.png: %.ps $(PFAFILES)
gs -q -dSAFER -sDEVICE=pnggray -dTextAlphaBits=4 -o $@ \
- bedstead.pfa bedstead-ext.pfa \
- bedstead-con.pfa bedstead-sem.pfa $<
+ $(PFAFILES) $<
bedstead-%-df.png: df.ps bedstead.pfa
gs -q -dSAFER -dsize=$* -sDEVICE=png16m -o $@ bedstead.pfa $<
@@ -33,14 +54,6 @@ bedstead-%-df.png: df.ps bedstead.pfa
clean:
rm -f bedstead *.sfd *.otf *.bdf *.pfa *.png
-DISTFILES = bedstead.c Makefile COPYING \
- bedstead.sfd bedstead.otf bedstead.pfa bedstead.afm \
- bedstead-ext.sfd bedstead-ext.otf bedstead-ext.pfa bedstead-ext.afm \
- bedstead-con.sfd bedstead-con.otf bedstead-con.pfa bedstead-con.afm \
- bedstead-sem.sfd bedstead-sem.otf bedstead-sem.pfa bedstead-sem.afm \
- bedstead-10.bdf bedstead-20.bdf \
- bedstead-10-df.png bedstead-20-df.png
-
.PHONY: dist
dist: $(DISTFILES) bedstead
diff --git a/bedstead.c b/bedstead.c
index bb5e709..d0b866d 100644
--- a/bedstead.c
+++ b/bedstead.c
@@ -141,23 +141,35 @@ struct param const params[] = {
5, /* ttfwidth */
},
{
- "--extended",
- "Bedstead-Extended", "Bedstead Extended",
- 124, /* xpix */
- 7, /* ttfwidth */
- },
- {
- "--condensed",
- "Bedstead-Condensed", "Bedstead Condensed",
+ "--ultra-condensed",
+ "Bedstead-UltraCondensed", "Bedstead Ultra Condensed",
50, /* xpix */
1, /* ttfwidth */
},
{
- "--semicondensed",
- "Bedstead-Semicondensed", "Bedstead Semicondensed",
+ "--extra-condensed",
+ "Bedstead-ExtraCondensed", "Bedstead Extra Condensed",
62, /* xpix */
2, /* ttfwidth */
},
+ {
+ "--condensed",
+ "Bedstead-Condensed", "Bedstead Condensed",
+ 76, /* xpix */
+ 3, /* ttfwidth */
+ },
+ {
+ "--semi-condensed",
+ "Bedstead-Semicondensed", "Bedstead Semi Condensed",
+ 88, /* xpix */
+ 4, /* ttfwidth */
+ },
+ {
+ "--extended",
+ "Bedstead-Extended", "Bedstead Extended",
+ 124, /* xpix */
+ 7, /* ttfwidth */
+ },
};
struct param const *param = ¶ms[0];
diff --git a/bedstead.css b/bedstead.css
index 35a6569..edc8ab0 100644
--- a/bedstead.css
+++ b/bedstead.css
@@ -15,7 +15,7 @@ kbd, code, tt, pre {
h2 {
font-size: 2em;
- font-stretch: condensed;
+ font-stretch: ultra-condensed;
font-weight: inherit;
margin-top: 0.5em;
margin-bottom: 0.5em;
@@ -27,11 +27,36 @@ h1, h2 {
@font-face {
font-family: Bedstead;
+ font-stretch: expanded;
+ src: url(bedstead-extended.otf) format("opentype");
+}
+
+@font-face {
+ font-family: Bedstead;
+ font-stretch: normal;
src: url(bedstead.otf) format("opentype");
}
+@font-face {
+ font-family: Bedstead;
+ font-stretch: semi-condensed;
+ src: url(bedstead-semicondensed.otf) format("opentype");
+}
+
@font-face {
font-family: Bedstead;
font-stretch: condensed;
- src: url(bedstead-con.otf) format("opentype");
+ src: url(bedstead-condensed.otf) format("opentype");
+}
+
+@font-face {
+ font-family: Bedstead;
+ font-stretch: extra-condensed;
+ src: url(bedstead-extracondensed.otf) format("opentype");
+}
+
+@font-face {
+ font-family: Bedstead;
+ font-stretch: ultra-condensed;
+ src: url(bedstead-ultracondensed.otf) format("opentype");
}
diff --git a/extended.ps b/extended.ps
index 93bf1ca..91852e0 100644
--- a/extended.ps
+++ b/extended.ps
@@ -1,10 +1,10 @@
-<< /HWResolution [ 72 72 ] /PageSize [ 700 120 ] >> setpagedevice
+<< /HWResolution [ 72 72 ] /PageSize [ 860 120 ] >> setpagedevice
/Bedstead findfont 40 scalefont setfont
0 88 moveto (Bedstead) show
-/Bedstead-Condensed findfont 80 scalefont setfont
-0 8 moveto (Condensed) show
+/Bedstead-UltraCondensed findfont 80 scalefont setfont
+0 8 moveto (Ultra Condensed) show
/Bedstead-Extended findfont 40 scalefont setfont
-300 88 moveto (Extended) show
-/Bedstead-Semicondensed findfont 80 scalefont setfont
-300 8 moveto (Semicondensed) show
+400 88 moveto (Extended) show
+/Bedstead-ExtraCondensed findfont 80 scalefont setfont
+400 8 moveto (Extra Condensed) show
showpage
diff --git a/index.xhtml b/index.xhtml
index df084c7..9f50464 100644
--- a/index.xhtml
+++ b/index.xhtml
@@ -26,14 +26,17 @@
![[ A sample of Bedstead's characters ]](sample.png)
- The standard version of Bedstead is based on a square pixel
- grid. This is good for displays with square pixels, but not
- entirely faithful to the SAA5050. There is a second version,
- Bedstead Extended, that more accurately reflects the character
- shapes generated by an SAA5050 driving a 576i display.
+ Bedstead is available in six widths. The standard version of
+ Bedstead is based on a square pixel grid. This is good for
+ displays with square pixels, but not entirely faithful to the
+ SAA5050. There is a second version, Bedstead Extended, that
+ more accurately reflects the character shapes generated by an
+ SAA5050 driving a 576i display.
To simulate teletext double-height mode, Bedstead and
Bedstead Extended each has a half-width version, Bedstead
- Condensed and Bedstead Semicondensed respectively.
+ Ultra Condensed and Bedstead Extra Condensed respectively.
+ Bedstead Condensed and Bedstead Semi Condensed provide intermediate
+ widths.
![[ Bedstead and Bedstead Extended ]](extended.png)
@@ -42,6 +45,16 @@
FontForge, which
can convert it into most reasonable font formats.
+ Mosaic Graphics
+ Bedstead includes all of the teletext mosaic graphics
+ characters available from the SAA5050. Since these are not
+ encoded in Unicode, Bedstead makes them available in the Private
+ Use area between U+EE00 and U+EE7F, in the same arrangement as
+ is used by
+ ZVBI.
+
+ î¸î¹î¸î¸î¹î¸î¸î¹î¸î¸î¹î¸î¸î¹î¸î¸î¹î¸î¸î¹î¸î¸î¹î¸î¸î¹î¸î¸î¹î¸î¸î¹î¸
+
Copyright
The program that generates Bedstead and all of the
newly-designed glyphs have been released into the public domain.
@@ -67,24 +80,25 @@