Page 1 of 1

How to change the FZX fonts in z88dk?

Posted: Mon Jan 15, 2018 7:15 pm
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.

Posted: Mon Jan 15, 2018 8:46 pm
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.

Posted: Tue Jan 16, 2018 4:59 am
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.

Posted: Fri Jan 19, 2018 3:15 pm
by Stefan123
Thanks, I tried the second option and it works fine.