From f275af5c1858a5387c693565c0512dcb152d9737 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Fri, 11 Oct 2024 10:08:13 +0100 Subject: [PATCH] Make a package of console fonts Rules to make the PSF files are currently in debian/rules, but they could easily go in Makefile instead. --- debian/clean | 2 ++ debian/consolefonts-bedstead.README.Debian | 6 ++++ debian/consolefonts-bedstead.install | 1 + debian/control | 14 +++++++- debian/rules | 42 ++++++++++++++++++++++ 5 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 debian/clean create mode 100644 debian/consolefonts-bedstead.README.Debian create mode 100644 debian/consolefonts-bedstead.install diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..768079b --- /dev/null +++ b/debian/clean @@ -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 index 0000000..7b498eb --- /dev/null +++ b/debian/consolefonts-bedstead.README.Debian @@ -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 index 0000000..5462388 --- /dev/null +++ b/debian/consolefonts-bedstead.install @@ -0,0 +1 @@ +*.psf.gz /usr/share/consolefonts diff --git a/debian/control b/debian/control index 84f57fc..88da6aa 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: bedstead Maintainer: Ben Harris 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. diff --git a/debian/rules b/debian/rules index 2cbd511..9bb1e0b 100755 --- a/debian/rules +++ b/debian/rules @@ -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 -- 2.30.2