SAM Coupé and ZX Spectrum Fonts

Using the Fonts

The fonts are only available in psf form for the Linux console at the moment. I think that I will be able to create font files for the X Window System (pcf), Microsoft Windows (fon), and MS-DOS (cpi). These will start to appear after the psf fonts are complete. Run the command consolechars -f fontname.psf where fontname.psf is the name of the font that you wish to use. You will want to run this from the console, and it helps if X is not running. (If you are using a framebuffer, then X might not be a problem for you.)

For example:

If X is running and you change the font, then X will try to restore the font when you switch away from X. However, the mappings may no longer be correct, and if you switch to a smaller font (most likely with these 8×8 fonts), you will not be able to see a portion of the screen at the bottom. To correct this, you will have to run a command that changes to a font with a different size to that of the last font that you switched to.

Can I Get a Table of Characters?

Look at the manpages for ascii and latin1. The ascii manpage mostly shows characters from the original font. The latin1 manpage mostly shows characters that have been added. For the SAM font, most of the glyphs are missing, because they haven’t been done yet. For the ZX Spectrum font, most of the glyphs are there.

To see the vt100 line characters working, you can use a program such as links. Try running "echo ^Nabcdefghijklmnopqrstuvwxyz^O" — to get the ^N and ^O symbols, press control-V, control-N and control-V, control-O respectively. If you mess the display up, you can just type reset and press enter.

SAM Font

This is the SAM Coupé’s font converted into a psf file. The font was originally designed by Simon N Goodwin.

Some glyphs have been moved, removed and added, in the process of making this an ISO Latin-1 font. In particular, you may notice that the SAM’s upwards arrow symbol has been replaced with a caret (U+005e), and that the apostrophe is now a neutral quotation mark (U+0027). The copyright symbol (U+00a9) has been moved, and the backtick (U+0060) has been drawn in its place. I am not suggesting that there was ever anything wrong with the SAM’s font; it just wasn’t quite ASCII.

It was made by taking a screenshot of all of the characters displayed in a Simcoupé window, using the gimp to crop/scale this image and write out the resulting bitmap to an xpm (x-pixmap) file, and a bit of C code to convert this xpm ‘image’ (xpm files are valid C, consisting of an array of strings) into a font. The unicode mapping was taking from lat1-08.psf.gz. I am using cfe as my font editor.

I tried looking in the ROM for the font, but it seems that the glyphs are not stored in the obvious way.

Files

Changes

Sat Jan 11 18:11:30 GMT 2003: added several more glyphs to the font, including (hopefully) all of line glyphs for the vt100 characters.

Sat Jan 11 16:58:43 GMT 2003: added acute and grave accented glyphs for a, e, i and o. Moved copyright and pound signs, added backtick and made single quote neutral.

Sat Jan 11 16:38:13 GMT 2003: updated font to include vt100 frame glyphs. Original font available here.

Spectrum Font

Also available is an updated version (psf) of the ZX Spectrum font that I did some time ago. Whilst it’s still not finished, it includes the glyphs for vt100 frames, along with a unicode mapping. This was achieved by copying the font from the Spectrum’s ROM, padding it out with 0s, drawing the extra glyphs with a font editor for DOS, and then adding the psf header. I’m now using cfe to edit fonts, and have added vt100 frames with this editor.

Notes for the SAM font regarding the encoding used for that font also apply here. As far as I can tell, the SAM and Spectrum both use the same encoding.

There is a Windows version by John Elliot. Also, various truetype versions can be found around the net, but I fail to see the logic in providing a bitmap font in truetype format.

Files

Changes

Sat Jan 11 19:21:22 GMT 2003: added zxspec-zx files in psf and raw formats. These were pretty easy to obtain from the original ROM.

Sat Jan 11 16:38:13 GMT 2003: updated zxspec-lat1, shifting a few more glyphs around.

Other Fonts

Although I haven’t done any others yet, possible candidates would be fonts from flash, from games, and from other microcomputers. More suggestions would be most welcome.


Stuart Brady

Valid XHTML 1.1