Thread with 15 posts
jump to expanded posti wanted to experiment with Unicode in #uxn, so i wrote a little program that reads, decodes and displays each GNU Unifont glyph in the Basic Multilingual Plane, one at a time… at 60fps :3
the result is pretty mesmerising!
https://github.com/hikari-no-yume/unifont-appreciator/blob/trunk/hexdream.tal
this was a lot of fun to write. uxntal is an extremely fun assembly language to play with.
my goal of course is to write a partially unicode-capable text viewing program for #uxn. the ecosystem right know is very ascii-centric, so the language support is eurocentric at best, which is a real shame :(
i think a little effort can go a long way: utf-8 is easy to parse, and there's already gnu unifont, a free pixel font that covers almost all of unicode, which seems very uxn-friendly. combine those and you can “display” almost any unicode text, though with very, very big caveats
(the caveat is that scripts like arabic will not be displayed anywhere near correctly and this breaks my heart)
@hikari icuxn
@hikari Very very excited to see you experiment with this! I think I can learn a trick or two from your experiments that will help me localize noodle and nasu. <3
@neauoire thanks for the support! i really want to see how far i can get without, like, pulling in all of icu or the cldr, which are huge dependencies. i think supporting most european languages, plus chinese and japanese, should be quite easy, you just need a really big font. but i've followed @nasser for long enough that i can't settle for that, i have to see if i can support arabic somehow…
@neauoire has anyone experimented with dynamic libraries for uxn? since it's a von neumann architecture, it'd be super easy to just like, reserve a small part of ram for a text rendering library. that might be one way to avoid having to include specific code for all the world's languages in the text editor… perhaps you could just load the “arabic module” or the “mongolian module” or what have you?
@neauoire oh right, big caveat: supporting reading text files in european languages, chinese and japanese is easy, but being able to write text is pretty complicated. i'm not even attempting that for the time being.
@hikari I've done a bit of that for the application API in Potato, but I haven't seen it in the wild.
Most of the text rendering code I use, is less than 40 bytes long, so I tend to just copy paste it between projects. I haven't written any big uxntal projects, just little tools that I use daily, but writing large apps with libraries scare me a bit. I'm still learning how to write uxntal myself ^^;
@neauoire ahh… that must be related to how it manages to support several instances of the same app at the same time, i was really surprised when i noticed that worked
@hikari I recently discovered the UNSCII font - if you want variations. It has good symbol coverage. 🙂
@hikari awesome!!!