Page 1 of 1
U8/M (UTF-8 for Microcomputers)
Posted: Tue Aug 08, 2023 6:26 am
by RebeccaRGB
I wrote this demo years ago of Unicode text rendered on the Commander X16 with multiple fonts and multiple scripts. The memory map of the CX16 and the register layout of the VERA have changed several times since then, but since they finally seem to be settling down, I figure I would get it working again.
- Screenshot from 2023-08-07 22-56-35.png (24.51 KiB) Viewed 7199 times
The font format is publicly documented in the
GitHub repository.
I don't expect another font format to get support when the CX16 ROM already supports GEOS fonts. I've also created
an extension to the GEOS font format as well that would enable Unicode text; I might take a crack at getting that working with the CX16.
#R43
Re: U8/M (UTF-8 for Microcomputers)
Posted: Tue Aug 08, 2023 1:32 pm
by Daedalus
How are the fonts rendered?
It appears to be completely software, storing font data in banked RAM, rasterizing each character, then rendering them to a bitmap layer. It looks like it took about 4 seconds to render the demo screen.
All of the fonts displayed appear to be the same size,
If you want a different size font, will that require a different font file?
Can you change the color of the text?
Is there a tool to make the fonts themselves?
Re: U8/M (UTF-8 for Microcomputers)
Posted: Tue Aug 08, 2023 3:04 pm
by DragWx
Tangentally related, if you want to gain a whole new appreciation for all of the nuance that goes into modern text rendering with modern fonts, have a look at this:
Text Rendering Hates You by Aria Beingessner.
It does look like U8/M's font format is a bitmapped format, so each font size would need to be its own font file (just like in the old days), which I think is the right choice until we see demos showing off some impressive vector rendering.
When you're using a 640x480 bitmapped screen, there's only enough VRAM for 2bpp maximum (i.e., 4 colors), so I wouldn't expect anything fancy or colorful, maybe some anti-aliasing, but that's it.
Anyway, this is a really cool demo. Another thread here prompted me to start reading up on how printers work, and having a text renderer like this is the first step to WYSIWYG desktop publishing.
Re: U8/M (UTF-8 for Microcomputers)
Posted: Wed Aug 09, 2023 2:28 am
by RebeccaRGB
A different size will require a different font file; there's no scaling capability.
You can change the color.
There is a tool to make the font files; it's open-source as well:
https://github.com/kreativekorp/bitsnpicas
Re: U8/M (UTF-8 for Microcomputers)
Posted: Fri Aug 11, 2023 5:12 pm
by Xiphod
Hey just wanted to say tried this on DevBoard hardware and it works great - yeah ~4 seconds to draw the whole screen (but it's a mixture of fonts). In the .s code I saw mention of some color? Is that compiled with wasm? Neat stuff and a few other sample fonts to try out there. Maybe if I swap in a different one, I can finally decode what that Greek and Cryillic is saying
Many years ago, I was once reading the "last will and testament" of some crew of the Mayflower. One thing I recall noticing was that while there is a different handwriting style to a person, no two letters is ever quite written the same. I've always wondered if a font like that could be made - it sort of "auto generates" the font on the fly, so that each time you type "the" it looks slightly different (within a tolerance). Imagine "personalized fonts" used in your text messaging. Or, it could ask you to write for a while and sort of "train" to your writing style and generate a font based on that.
Re: U8/M (UTF-8 for Microcomputers)
Posted: Fri Aug 11, 2023 10:50 pm
by DragWx
voidstar wrote: ↑Fri Aug 11, 2023 5:12 pm
Many years ago, I was once reading the "last will and testament" of some crew of the Mayflower. One thing I recall noticing was that while there is a different handwriting style to a person, no two letters is ever quite written the same. I've always wondered if a font like that could be made - it sort of "auto generates" the font on the fly, so that each time you type "the" it looks slightly different (within a tolerance). Imagine "personalized fonts" used in your text messaging. Or, it could ask you to write for a while and sort of "train" to your writing style and generate a font based on that.
If you've ever played Toejam & Earl for the Genesis, the game uses a handwritten-style font for all text and UI, and occasionally, the game applies a 2-frame "wiggle" effect where the font flips between two very slightly different versions of itself, like if the font designer drew each letter twice. You can see the effect on the main menu, and the whole thing is peak 90s.
EDIT: I just remembered, Baba Is You uses this effect for
all of its graphics.
I can't speak to auto-generating each letter form on the fly, but having a font that randomly selects between 2 or 3 variations on the same letter form each time that letter comes up can approximate what you're asking about.
Re: U8/M (UTF-8 for Microcomputers)
Posted: Thu Sep 21, 2023 4:53 pm
by mortarm
DragWx wrote: ↑Fri Aug 11, 2023 10:50 pm
If you've ever played Toejam & Earl for the Genesis, the game uses a handwritten-style font for all text and UI, and occasionally, the game applies a 2-frame "wiggle" effect where the font flips between two very slightly different versions of itself, like if the font designer drew each letter twice. You can see the effect on the main menu, and the whole thing is peak 90s.
This was also a popular effect used in some cartoons in the early '00s, but they extended it to wiggle all lines. Dr. Katz was the first to use this.