The official FZX font format definition (including several sample fonts) is now available in FZX_Standard.zip (http://www.mediafire.com/?8uuhvsnpgb51owb), a tape file containing some practical examples is available in FZX.tap.zip (http://www.mediafire.com/?mdv5v7grxohsr33), and the source code for the proportional printing driver is available in FZX_Driver.zip (http://www.mediafire.com/?771dvvm797h7srr).
However let's skip all the tech details and go straight to the interesting stuff! Every character in a regular ZX-Spectrum font is designed using a 8x8 grid like this:
But using FZX, each character definition is fully configurable and uses an arbitrary sized grid, like this:
In the example above, the character pixels are defined in a smaller 5x5 grid, and everything else is configurable. This particular FZX font specifies that all characters are 9 pixels tall ("baseline"), character "a" is located at a distance of 2 pixels from the top ("leading"), character "a" is 5 pixels wide ("width"), and there should be 2 pixels of distance before the next character ("tracking").
All these configurations make it possible to define proportional fonts that are fully flexible and configurable, but still very compact, using about the same amount of memory as a regular font.
Now let's consider a practical example. This is the original Sinclair font:
And here's the same text, using the same font style, but now converted to take advantage of FZX format using proportional spacing:
Although it's the same font style and size, the latter version is more comfortable to read and doesn't take so much room on screen, so it's certainly an improvement!
Another nice feature of FZX format is that it supports quite large fonts, with characters up to 16 pixels wide. Here's another example, this time using a much larger font called "Grotesk" (also supplied in the link above):
So how do you use FZX fonts in practice? It's actually very simple. First, load the driver from tape (together with any FZX font of your choice) and initialize it only once, like this:
Código: Seleccionar todo
CLEAR 59999: LOAD "Sinclair"CODE 60000: LOAD "FZXdriver"CODE 65000: RANDOMIZE USR 65000
Afterwards, simply use PRINT #4 to print your text, for instance:
Código: Seleccionar todo
PRINT #4;AT 0,0;"FZX driver code (c) Einar Saukas"'"FZX font format (c) Andrew Owen"
PRINT #4: FOR f=32 TO 127: PRINT #4;CHR$ f;: NEXT f
Using font "Zaibatsu" for instance (also supplied in this package), the program above will produce the following result:
That's easy, right?
As indicated in the screen above, Einar Saukas and I have worked together to create FZX. I concentrated on defining the standard and designing the sample fonts supplied in this package, while he focused on coding it. Anyway everything presented here is open source and royalty-free, so you are welcome to use any of this material in your own programs (even commercial releases) and to create new FZX fonts yourself!