Acorn User


Hershey Characters Font Generator

Author: Malcolm Banthorpe
Publisher: Beebug
Machine: BBC Model B

 
Published in Acorn User #036

Vintage Characters

While the in-built character set on the BBC Micro is sufficient for the majority of applications where the main requirement is that the text be as legible as possible, e.g. program listings, word processing, data display, there are some occasions where larger and alternative text fonts are desirable. Additional characters are fairly easily created using the VDU 23 command to define ASCII codes 224 to 255 or to redefine existing characters whose codes lie in the range 32 to 126.

There is, however, a limit to the amount of detail which can be defined on an 8x8 matrix. The size of character as displayed on the screen will similarly be limited by the matrix and the width will depend upon the graphics mode in which it is displayed. It's not too difficult to devise a routine which will display larger characters by repeating pixels both horizontally and vertically, but the lack of detail is then made more prominent.

Hershey Characters from Beebugsoft is a font generator package supplied on either disc or cassette which takes a different approach to generating high resolution characters. the result is an extremely flexible way of creating high quality text (and other) displays. Instead of being defined as a series of dots, each character is encoded as a series of plot vectors, i.e. curves and when displaying the more baroque fonts, such as gothic. A further advantage of this method of encoding is that characters can be rotated.

The package contains nearly 1,600 pre-defined characters in nine different fonts. Text styles available are Sans Serif, Cursive Script (looks like 'joined-up' handwriting), Roman, Italic, Olde (sic) English, Gothic, Italian Gothic, Greek and Russian. The range of possible applictions is broadened by the inclusion of a large number of graphics characters, covering musical notation, astrological symbols, algebraic characters and map features. Each character is designated by a Hershey number, though text can be generated directly from a text string.

In order to assist with the positioning and layout of characters on the screen a number of Basic procedures and functions are supplied. Among the most useful are: centring text at a given height; centring text at the current graphics cursor position; and drawing text between two sets of co-ordinates.

In all, there are nine functions and procedures, not all of which will be required in every display. In order to avoid typing up unnecessary memory, which is always at a premium in graphics programs, the menu-driven software will automatically generate for you a skeleton program containing just those facilities which you require.

This program generation also loads a series of data statements containing the font or individual characters you want to display. Because of the detail in each character, these data statements are quite long; for example, an upper case italic 'U' requires nearly 100 bytes to define.

A direct consequence of this is that if you want to use one of the 20K graphics modes, it will almost certainly be necessary to load only those characters that you require rather than a whole font. This highlights possibly the biggest limitation on how the package can be used. This is not a fault of the software but results from the size of the BBC Micro's RAM, which is beginning to look pitifully small by today's standards.

Having generated the skeleton program, all that remains to be done is to insert the required text or characters and to set the variables to give the required sizes, positions and rotations. The angles of rotation of character strings and of separate characters are individually variable. As the routines are all in Basic and are described in the manual, it is also possible to modify them to your own requirements.

A screen dump is supplied for use with Epson printers and those with Epson-compatible control codes. Although not mentioned in the manual, the way that these characters are encoded make them highly suitable for output to a plotter, provided you're prepared to modify the plotting routines. There is then no need to use a high resolution screen mode and memory becomes less of a problem.

With the disc version comes a second facility called Multifont. This makes available a further 14 fonts, which in this case can be used directly from the keyboard or within programs. These characters are based on a 16 x 16 matrix, being a block of four standard characters.

A very easy-to-use font editor is also included which allows the existing fonts to be modified and new ones to be created. There are facilities to rotate the characters in increments of 90 degrees and also to invert and mirror them. While these characters do not offer the same degree of versatility as the Hershey characters, they have the advantage of being accessible directly from the keyboard and loading a whole font takes up less memory space. The character data for a complete font is stored between &1100 and &1CFF, so PAGE must first be set to &1D00, and some disc commands therefore cannot be used.

The Hershey Font Generator is an excellent utility, capable of giving high quality text and other displays to the limits of the BBC Micro's screen resolution - the main limitation is the micro's lack of RAM.

Malcolm Banthorpe

Other BBC Model B Game Reviews By Malcolm Banthorpe


  • Graphics Extension ROM Front Cover
    Graphics Extension ROM
  • Airbrush Front Cover
    Airbrush