public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Making a new frame-buffer console font
@ 2015-02-03 14:43 Peter Humphrey
  2015-02-04 14:19 ` Walter Dnes
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Humphrey @ 2015-02-03 14:43 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

Hello list,

This is to summarise what I did in case anyone else wants to do
something similar.

Last May I was looking for a font that would distinguish the upper-case
letter O from the numbers 0 and 8 on a virtual TTY with a frame-buffer.
My difficulty was twofold: the available unicode fonts were all too
small, and the only bigger fonts I could find had an oblique stroke
through the zero which made it look like an eight[1], and some of them
even had serifs.

The first step was to find a font that looked good. I chose terminus
font, which included fonts up to 32 pixels tall and had an attractive
and easily read shape to its characters.

The second step was to find a font editor, and I found nafe[2]. I
fetched it and compiled it locally. GCC threw out an error but the
program seemed to work anyway. I followed its readme.txt and used the
text editor joe to replace the oblique stroke in the zero with spaces,
and to round the shoulders; I made sure I kept the line lengths the
same, though it's supposed not to be necessary. Lastly I gzip'd the new
font file.

The shoulders could be made more rounded, but for the moment I'm happy
with the result I have.

Thirdly, working at a virtual console, I replaced the original 
/usr/share/consolefonts/ter-v20n.psf.gz with my new version and called 
"etc/init.d/consolefont restart". Lovely!

There was still a problem though: when I ran a kernel menuconfig the
line characters were displayed as question marks; the system log on VT12
couldn't display all the characters right either.

The reason was straightforward. I'd noticed that nafe used file-name
suffix .psfu for fonts with unicode maps and .psf for those without.
Since all the files in /usr/share/consolefonts had .psf I assumed they
didn't need the map. Wrong. So I added the unicode map into my new.ter-
v20n.psf to make new.ter-v20n.psfu, then gzip'd it and copied it back
into /usr/share/consolefonts as ter-v20n.psf.gz. (Notice the missing u.)
Now I get the expected display of kernel menuconfig and the VT12 log.

The final step was to add /usr/share/consolefonts to CONFIG_PROTECT in
/etc/portage/make.conf so that I wouldn't lose my changes at the next
upgrade.

I've attached my three new console fonts for anyone who'd like to use
them. I've settled on the 22-pixel version pro tem.

Thanks to David Haller for getting me started by pointing me in the
right direction.

1.	Where did that oblique stroke come from? Was it just copied blindly
from those nasty old line printers, with their poor resolution? It must
surely be time now to get rid of it.

2.	Not another font editor: http://sourceforge.net/projects/nafe/files/nafe/nafe-0.1/

-- 
Rgds
Peter.

[-- Attachment #2: new-v20n.psfu --]
[-- Type: application/octet-stream, Size: 22260 bytes --]

[-- Attachment #3: new-v22n.psfu --]
[-- Type: application/octet-stream, Size: 24308 bytes --]

[-- Attachment #4: new-v24n.psfu --]
[-- Type: application/octet-stream, Size: 26356 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2015-02-10  4:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-03 14:43 [gentoo-user] Making a new frame-buffer console font Peter Humphrey
2015-02-04 14:19 ` Walter Dnes
2015-02-04 15:33   ` Peter Humphrey
2015-02-04 17:16     ` Walter Dnes
2015-02-04 19:00     ` wabenbau
2015-02-06 15:42       ` [gentoo-user] " Grant Edwards
2015-02-07  9:59       ` [gentoo-user] " Peter Humphrey
2015-02-08  0:16         ` wabenbau
2015-02-08  0:31           ` wabenbau
2015-02-08  9:33           ` Peter Humphrey
2015-02-08 11:00             ` Neil Bothwick
2015-02-08 12:16               ` Peter Humphrey
2015-02-08 12:59                 ` Neil Bothwick
2015-02-08 13:30               ` Alan McKinnon
2015-02-08 16:31                 ` wabenbau
2015-02-08 22:50                   ` Peter Humphrey
2015-02-08 23:23                     ` Neil Bothwick
2015-02-09  5:11                       ` Peter Humphrey
2015-02-09  9:15                         ` Neil Bothwick
2015-02-09  6:49                     ` Alan McKinnon
2015-02-09  7:00                       ` Dale
2015-02-09 10:12                         ` Peter Humphrey
2015-02-10  4:54                       ` wabenbau
2015-02-09 22:40                   ` [gentoo-user] " Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox