BigFont and BigFontSemi (make large versions of system font)

Post Reply
voidstar
Posts: 494
Joined: Thu Apr 15, 2021 8:05 am

BigFont and BigFontSemi (make large versions of system font)

Post by voidstar »

I just realized I never included these in the Forum Downloads! They were only in Discord (and the EXPLORE folder of the Launch SD card).

BIGFONT will scale a given text input to a given scale-factor (x1, x2, x3, etc.) They are converted into an in-memory array, so for long strings you can quickly run out of memory. This scales the currently active font.

BIGFONTSEMI is similar, but scales effectively to a x0.5 factor. A little confusing: it's not a smaller font, but smaller relative to the 1 pixel to 1-block that the x1 factor scaling would be. It has to examine the current font a little more carefully to adapt this to an appropriate PETSCII set of symbols.

Also serves as an example of using BASLOAD for something interesting. The computed "bigfonts" are stored in arrays that can be output for various purposes (printer, file), by default they go to the screen.

The TryIt example here is set to exercise BigFontSemi. The attached zip includes all variants.
Try It Now!
Attachments
BIGFONT.ZIP
(457.34 KiB) Downloaded 76 times
BIGFONTSEMI.PRG
(1.89 KiB) Downloaded 71 times
BIGFONTSEMI.BASL.TXT
(7.88 KiB) Downloaded 76 times
BIGFONT.PRG
(2.13 KiB) Downloaded 77 times
BIGFONT.BASL.TXT
(8.18 KiB) Downloaded 75 times
voidstar
Posts: 494
Joined: Thu Apr 15, 2021 8:05 am

Re: BigFont and BigFontSemi (make large versions of system font)

Post by voidstar »

Here are some examples of the BigFontSemi and BigFont output results.

Program could be extended to make use of BANKs for even larger conversions, but for now just BASIC "lo-RAM" is used (so limited to about 28K or so). Also if writing to the screen, it may be possible to inject CBM color codes between the letters.

Since using BASLOAD, can be easy to adjust BigFont to alter the desired scaled symbol to use.

And the output can be altered if using SHIFT+ALT or ISO (ALT+O) mode to adjust the font (since the currently load font is pulled directly from memory when scaling).
Attachments
bigfont_examples.jpg
bigfont_examples.jpg (285.97 KiB) Viewed 759 times
Post Reply