With the attached patch included, the following command appears to handle all of the installed console fonts properly.
file -z /usr/share/consolefonts/*psf* Please let me know if there are any questions or comments about the patch. Adam Buchbinder
From f21ca7272a0d9ff4ac54a339d5860c9d58bc4026 Mon Sep 17 00:00:00 2001 From: Adam Buchbinder <adam.buchbin...@gmail.com> Date: Tue, 17 Feb 2009 11:17:25 -0500 Subject: [PATCH] Add detection of PSF2 fonts. Linux console fonts come in two formats; PSF1 is already detected, but PSF2, used for fonts which aren't 8-by-x shaped, was not. Add detection of these fonts, and make the output look similar to the PSF1 output, though with a different version number. For more information, see: http://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html --- debian/patches/00list | 1 + debian/patches/220-magic-update-psf.dpatch | 38 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 0 deletions(-) create mode 100755 debian/patches/220-magic-update-psf.dpatch diff --git a/debian/patches/00list b/debian/patches/00list index 82c74bf..bedfc16 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -16,6 +16,7 @@ 217-magic-update-ruby.dpatch 218-magic-update-gimp.dpatch 219-magic-update-wav.dpatch +220-magic-update-psf.dpatch 320-magic-add-par2.dpatch 321-magic-add-pe5.dpatch 322-magic-add-pmenu.dpatch diff --git a/debian/patches/220-magic-update-psf.dpatch b/debian/patches/220-magic-update-psf.dpatch new file mode 100755 index 0000000..e5897b9 --- /dev/null +++ b/debian/patches/220-magic-update-psf.dpatch @@ -0,0 +1,38 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 220-magic-update-psf.dpatch by Adam Buchbinder <adam.buchbin...@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Implement detection of PSF2 fonts; also clarify detection of PSF1 +## DP: fonts while we're at it. (Closes: #492035) + +...@dpatch@ +diff -urNad file~/magic/Magdir/linux file/magic/Magdir/linux +--- file~/magic/Magdir/linux 2009-02-16 10:59:52.000000000 -0500 ++++ file/magic/Magdir/linux 2009-02-17 11:14:44.000000000 -0500 +@@ -44,12 +44,21 @@ + 2 string LILO Linux/i386 LILO boot/chain loader + # + # PSF fonts, from H. Peter Anvin <h...@yggdrasil.com> +-0 leshort 0x0436 Linux/i386 PC Screen Font data, +->2 byte 0 256 characters, no directory, +->2 byte 1 512 characters, no directory, +->2 byte 2 256 characters, Unicode directory, +->2 byte 3 512 characters, Unicode directory, ++# Updated by Adam Buchbinder <adam.buchbin...@gmail.com> ++# See: http://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html ++0 leshort 0x0436 Linux/i386 PC Screen Font v1 data, ++>2 byte&0x01 0 256 characters, ++>2 byte&0x01 !0 512 characters, ++>2 byte&0x02 0 no directory, ++>2 byte&0x02 !0 Unicode directory, + >3 byte >0 8x%d ++0 string \x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data, ++>16 lelong x %d characters, ++>12 lelong&0x01 0 no directory, ++>12 lelong&0x01 !0 Unicode directory, ++>24 lelong x %d ++>28 lelong x \bx%d ++ + # Linux swap file, from Daniel Quinlan <quin...@yggdrasil.com> + 4086 string SWAP-SPACE Linux/i386 swap file + # From: Jeff Bailey <jbai...@ubuntu.com> -- 1.5.6.3