Contents > Appendix > Fonts
Previous | Next

5.3 Fonts

7yuv supports a number of font formats:

7yuv's text rendering engine uses monospaced, 1 bpp fonts. Vector and TrueType fonts will be converted to monospaced, 1 bpp, so they may not look as good as bitmap fonts.

Additional bitmap fonts in JWP, ZapFont, or BBC Font format can be installed by copying them into the fonts subdirectory inside the 7yuv installation directory.

7yuv maintains a font index cachefile font.dat to speed up scanning of the fonts subdirectory. No harm is done when deleting font.dat manually.

Additonal ZapFonts can be downloaded at this webpage: http://zap.tartarus.org/download (Mirror)

A few BBC fonts can be downloaded from ftp.uni-stuttgart.de: http://ftp.uni-stuttgart.de/pub/systems/acorn/riscos/graphics/fonts/ (Mirror)

ZapFont File Format

All words in little-endian byte order.

Offset Length Description
0      8      Magic word "ZapFont\xD"
8      4      Width
12     4      Height
16     4      First used character code
20     4      Last used character code +1
24     8      Reserved
32     N      Array of Last-First Character Bitmaps

Bitmaps are 1 bpp monochrome with LSB-left bit orientation. Each character consumes (Align8(Width) * Height)/8 bytes. If Width is not a multiple of 8, unused most signifant bits are set to 0.

BBCFont File Format

BBCFont files contain character definitions in the form of Acorn BBC Micro VDU (Video Display Unit) control codes. Without any file header, the font is defined as a concatenation of 10-byte sequences:

0x17 CC NN NN NN NN NN NN NN NN

0x17 is the VDU control code for character bitmap definition and constant. CC is the ASCII code for the character definition. The sequence of 8 NN bytes forms a 8x8 monochrome 1 bpp bitmap, with MSB-left bit orientation.

See http://central.kaserver5.org/Kasoft/Typeset/BBC/Ch34.html for a full list of VDU control codes.


http://datahammer.de
Previous | Next