How to change the FZX fonts in z88dk?

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
Stefan123
Member
Posts: 85
Joined: Fri Oct 21, 2016 7:57 am

How to change the FZX fonts in z88dk?

Post by Stefan123 »

Using the FZX Font Editor tool, I experimented with making one of the FZX fonts (the Prefect font) wider so that it would display better in Timex 512 x 192 hi-res mode. I updated the z88dk/libsrc/_DEVELOPMENT/font/fzx/fonts/ao/Prefect/Prefect.fzx file but it doesn't have any effect when I recompile my program and run it in CSpect. Are there precompiled versions of the FZX fonts inside one of the zxn libraries that take precedence?

In my opinion, the FZX fonts look to compressed when displayed in Timex hi-res mode.
User avatar
dom
Well known member
Posts: 2091
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

All the font files are kept within the library so you'll have to recompile the library if you put it there.

Alternatively if you link it with your project (easiest is probably to copy the .asm and .fzx files locally and add them to your source file list) then it will override what's compiled into the library.
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

If you're modifying the library files, as dom says you have to rebuild the library which can be done by running:

"Winmake zxn" (windows)
or
"make TARGET=zxn" (not windows)

from z88dk/libsrc/_DEVELOPMENT

The second option that dom mentions is easier. Just duplicate the _ff_ao_Prefect.asm file that holds the fzx binary but load your own font in the BINARY directive ( https://github.com/z88dk/z88dk/blob/mas ... refect.asm ). Add your .asm file to the compile line and this will be used in preference to the library's "_ff_ao_Prefect" label.

A third option is to change font by pragma:
https://github.com/z88dk/z88dk/blob/mas ... s.inc#L242

Add:
#pragma redirect CRT_OTERM_FONT_FZX = _ff_ind_Termino

but change the font name "_ff_ind_Termino" to the asm label you're using to point at the fzx binary.
Stefan123
Member
Posts: 85
Joined: Fri Oct 21, 2016 7:57 am

Post by Stefan123 »

Thanks, I tried the second option and it works fine.
Post Reply