Minor update: Ted2/Mojox improvements

I spent some time recently working on adding some features to ted2 and mojox, including:

Also. the canvas font system now supports rendering ALL characters in a font. Well, up to 65536 characters anway.

It used to only handle chars from 32-127, and I was a bit worried about how to add support more as the default DejaVuSans font alone has something like 4000 characters in it, and I didn’t want to generate ALL of them everytime as 99% of apps will only use a fraction of them.

I ended up going with a ‘page’ system, where each page contains up to 256 chars and pages are created ‘on demand’. This probaly isn’t ideal as it will produce 256 textures worse case, one for each page. A better approach is probably to use a dynamic atlas, but the current system will do for now.

This, combined with a tweak to mx2cc, should mean it’s now possible to display any char a font can handle. Check out the new fonttest banana that allows you to view all font pages.


Liked it? Take a second to support Mark Sibly on Patreon!

User comments
nerobot says:

Also added a pretty cool ‘process::’ stream protocol so you can just LoadString( “process::blah” ) and it will stdout from blah into a string…