Open snakebyte69 opened 1 year ago
If you allocate font bitmaps in psRAM (MALLOC_CAP_SPIRAM), we can have multiple user-defined fonts in the VDP at once, without the mode switch to 640x480 16 colours (MODE 3) failing.
I really would like to see the capability to define fonts from 6x8 to 16x32 in size and have a utility program to upload them into the VDP. A font switch should probably not clear the screen, but just home the cursor (or maybe not even that if we switch to a font that has the same width and height). It would be good to switch between bold and normal fonts of the same size. How many fonts should be there preprogrammed in the VDP is something to be decided.
It would also be good to delete the first 32 characters of the teletext font, as they aren't visible, (control codes), and this would also match the default font which does not have them. It likely needs an x-32
somewhere in the teletext code, ...
FYI the Console8 VDP variant (which runs on all Agon Light compatible machines) supports a new Font API from version 2.8.0.
that API uses buffers (and thus PSRAM) to store fonts, as per Lennart's suggestion above - indeed it supports just about everything suggested. any number of fonts can be uploaded - the only limit is the 4mb of usable PSRAM. variable width fonts are not supported, but fonts of different sizes are so fonts are no longer restricted to 8x8. you can switch between fonts at any time, and print out text containing multiple fonts
the C8 VDP also provides ways to use the first 32 characters in any font, via the use of VDU 27 (just like Richard Russell's versions of BBC BASIC)
Gerhard Skronn https://github.com/anoriangit/agon-vdp Add the ability to change to font files from command line e.g. SetFont gamefont.bmf SetFont user.bmf SetFont Televideo950.bmf - 14x10 font SetFont PETSCII.bmf - 8x8 font