U8/M (UTF-8 for Microcomputers)

For Scene Demos that display animations, graphics, and music. Also for tech demos of graphics capability of VERA or the audio capabilities of the PSG, FM, or PCM audio channels.
Post Reply
RebeccaRGB
Posts: 5
Joined: Fri Jul 03, 2020 11:48 am

U8/M (UTF-8 for Microcomputers)

Post 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
Screenshot from 2023-08-07 22-56-35.png (24.51 KiB) Viewed 7200 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
Attachments
u8mdemo.zip
(492.13 KiB) Downloaded 450 times
User avatar
Daedalus
Posts: 230
Joined: Fri Nov 11, 2022 3:03 am

Re: U8/M (UTF-8 for Microcomputers)

Post 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?
DragWx
Posts: 362
Joined: Tue Mar 07, 2023 9:07 pm

Re: U8/M (UTF-8 for Microcomputers)

Post 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. :P

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. :D
RebeccaRGB
Posts: 5
Joined: Fri Jul 03, 2020 11:48 am

Re: U8/M (UTF-8 for Microcomputers)

Post 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
Xiphod
Posts: 568
Joined: Thu Apr 15, 2021 8:05 am

Re: U8/M (UTF-8 for Microcomputers)

Post 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.
DragWx
Posts: 362
Joined: Tue Mar 07, 2023 9:07 pm

Re: U8/M (UTF-8 for Microcomputers)

Post 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. :D

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. :P
mortarm
Posts: 319
Joined: Tue May 16, 2023 6:21 pm

Re: U8/M (UTF-8 for Microcomputers)

Post 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. :D
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.
Post Reply