Which Unicode characters are "safe" in Glulx?

Is there a sort of consensus on which non-ASCII Unicode characters have widespread (or even universal) support on interpreters?

I understand that the basic issue boils down to “sure, you can put it in your code, but if the font the 'terp is using doesn’t have that character, you get a question mark, hollow box, or other replacement character,” so I suppose what I’m really asking is which characters are known to exist in as many fonts as possible for many interpreters across as many operating systems as possible.

I have a complex machine I’m designing, with analog readouts intended to be incomprehensible to the PC, so I’m tempted to use astrological and alchemical symbols, musical notes, and the like, but I also want that not to break for individual players, so I’m curious how to balance these concerns.

ASCII has been extended multiple times in many different ways. Depending on how backwards compatible you want to be, not even all ASCII characters are safe, but anything modern enough to run a Glulx terp should be fine.

I don’t think there’s any official survey of character availability, but guessing from historical knowledge, I’d expect the tiers to be:


You could make that work if you made a bound game with Lectrote and bundled it with relevant fonts. But it’s hard to see how it would be viable if you wanted to just distribute a blorb… I’d worry that half the commentary on the game would end up being people complaining about font issues.

1 Like

Wikipedia has a Unicode history list: Unicode - Wikipedia . MacOS and Windows have typically supported each Unicode release within a year.

1 Like

For interpreters though, if they’re a more traditional interpreter it really depends on what font they use. But if they’re a web based one (including Lectrote) then you pretty much don’t need to worry - the HTML engine will go looking and find an alternative font for any characters it doesn’t recognise. Unless it’s a really new Unicode character it should be able to find a font for almost all characters.

1 Like

Thanks for the detailed input, everyone. Since I’m attached to the current blorb-based packaging decision, it’s not central to the plot of the story, and I’d hate for anyone to have font problems, I suppose I’ll stick with words instead of symbols.

Again, thanks, everyone.

I believe that native OS font rendering also goes looking for alternative fonts. However, the way the interpreter works is probably relevant. Gargoyle, in particular, uses an unusual rendering system (SDL graphics) so it might run into more problems.

1 Like

This is correct. Gargoyle renders fonts directly using FreeType, after finding the font files themselves using a platform-specific method. Adding a substitution feature would be great, but wouldn’t be straightforward.

1 Like

One possible example of that is that I could never get Scroll Thief to display all Unicode characters correctly in Gargoyle. E.g. when reading the illuminated scroll in the second room, most of them would come out as question marks. Lectrote, on the other hand, would run the game without any problems albeit a tiny bit slower.

I’m not saying Gargoyle can’t do it, just that it wasn’t obvious to me how.

It seems that the game tries to check if “fullwidth letters” and “script letters” are available before printing them, but apparently this isn’t foolproof?

1 Like