chiark / gitweb /
Make a package of console fonts
authorBen Harris <bjh21@bjh21.me.uk>
Fri, 11 Oct 2024 09:08:13 +0000 (10:08 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 3 Dec 2024 16:16:57 +0000 (16:16 +0000)
Rules to make the PSF files are currently in debian/rules, but they
could easily go in Makefile instead.

debian/clean [new file with mode: 0644]
debian/consolefonts-bedstead.README.Debian [new file with mode: 0644]
debian/consolefonts-bedstead.install [new file with mode: 0644]
debian/control
debian/rules

diff --git a/debian/clean b/debian/clean
new file mode 100644 (file)
index 0000000..768079b
--- /dev/null
@@ -0,0 +1,2 @@
+*.psf
+*.psf.gz
diff --git a/debian/consolefonts-bedstead.README.Debian b/debian/consolefonts-bedstead.README.Debian
new file mode 100644 (file)
index 0000000..7b498eb
--- /dev/null
@@ -0,0 +1,6 @@
+Bedstead on the Linux console
+=============================
+
+To use Bedstead as a console font, edit /etc/default/console-setup to
+set FONTFACE="Bedstead" and either FONTSIZE="6x10" or
+FONTSIZE="12x20".  See console-setup(5) for more details.
diff --git a/debian/consolefonts-bedstead.install b/debian/consolefonts-bedstead.install
new file mode 100644 (file)
index 0000000..5462388
--- /dev/null
@@ -0,0 +1 @@
+*.psf.gz /usr/share/consolefonts
index 84f57fc4f24429d386667825be4a1508128d6d92..88da6aa5a01479545ede97e89e3b5b072dfdc275 100644 (file)
@@ -2,7 +2,7 @@ Source: bedstead
 Maintainer: Ben Harris <bjh21@bjh21.me.uk>
 Section: non-free/fonts
 Priority: optional
-Build-Depends: fonttools, ghostscript, debhelper-compat (= 13)
+Build-Depends: fonttools, ghostscript, bdf2psf, debhelper-compat (= 13)
 Standards-Version: 4.7.0
 Homepage: https://bjh21.me.uk/bedstead/
 Rules-Requires-Root: no
@@ -28,3 +28,15 @@ Description: monospaced fonts inspired by SAA5050 character generator
  This package contains the OpenType font files for Bedstead in two
  weights (medium and bold) and six widths (ultra condensed, extra
  condensed, condensed, semi condensed, normal, and extended).
+
+Package: consolefonts-bedstead
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Description: console fonts inspired by SAA5050 character generator
+ Bedstead is a family of angular monospaced fonts based on the
+ characters produced by the Mullard SAA5050 series of Teletext
+ Character Generators as used in the BBC Microcomputer.
+ .
+ This packages contains bitmap fonts suitable for use on Linux text
+ consoles in 10-pixel and 20-pixel sizes.
index 2cbd511359b908dafa82cfefd08fa64b8d9125ab..9bb1e0b28d601ccadbb890fbb9cd3eabd12e0763 100755 (executable)
@@ -4,3 +4,45 @@
 
 override_dh_compress:
        dh_compress -X.pdf
+
+# We restrict ourselves to codesets that are reasonably well-covered
+# by Bedstead.
+
+SMALL_CODESETS = CyrKoi CyrSlav Greek Hebrew Lat15 Lat2 Lat38
+FULL_CODESETS = FullCyrSlav FullGreek
+LARGE_CODESETS = Uni2
+
+CODESETS = $(SMALL_CODESETS) $(LARGE_CODESETS) \
+       $(addprefix Full, $(FULL_CODESETS))
+
+SMALL_PSFS = $(addsuffix -Bedstead20x12.psf,$(SMALL_CODESETS)) \
+       $(addsuffix -Bedstead10x6.psf,$(SMALL_CODESETS))
+FULL_PSFS = $(addsuffix -Bedstead20x12.psf,$(FULL_CODESETS)) \
+       $(addsuffix -Bedstead10x6.psf,$(FULL_CODESETS))
+LARGE_PSFS = $(addsuffix -Bedstead20x12.psf,$(LARGE_CODESETS)) \
+       $(addsuffix -Bedstead10x6.psf,$(LARGE_CODESETS))
+PSFS = $(SMALL_PSFS) $(FULL_PSFS) $(LARGE_PSFS)
+PSFGZS = $(addsuffix .gz,$(PSFS))
+
+B2PDIR = /usr/share/bdf2psf
+
+$(SMALL_PSFS): size = 256
+$(LARGE_PSFS) $(FULL_PSFS): size = 512
+$(SMALL_PSFS): fontset = $(B2PDIR)/fontsets/$*.256
+$(FULL_PSFS): fontset = $(B2PDIR)/fontsets/$(subst Full,,$*).256
+$(LARGE_PSFS): fontset = $(B2PDIR)/fontsets/$*.512
+$(SMALL_PSFS) $(LARGE_PSFS): equivs = $(B2PDIR)/standard.equivalents
+$(FULL_PSFS): equivs = /dev/null
+
+symbols = $(B2PDIR)/ascii.set+$(B2PDIR)/linux.set+$(fontset)+:$(B2PDIR)/useful.set
+
+%-Bedstead20x12.psf: bedstead-20.bdf
+       bdf2psf --fb bedstead-20.bdf $(equivs) $(symbols) $(size) $@
+%-Bedstead10x6.psf: bedstead-10.bdf
+       bdf2psf --fb bedstead-10.bdf $(equivs) $(symbols) $(size) $@
+
+%.psf.gz: %.psf
+       gzip -9nk $<
+
+execute_after_dh_auto_build: $(PSFGZS)
+       true