I’ve been tweaking Mark Tilford’s great extension Automap to get it running with a WIP. Part of that has been tweaking its Unicode output to try to create a text image that’s easier to comprehend.
The problem I’ve run into is that the maps only come out correctly horizontally lined up in some interpreters. Well, on Mac, only one so far! (Lectrote) I thought that in a textgrid window, this couldn’t happen (i.e. two characters printed at position 20 on two different lines should be vertically aligned with each other.)
They are always lined up correctly if I go back to using the basic ASCII art. But then they’re often visually too hectic in cases like the one we see in the example, with crossing diagonals and such.
I’ve attached a screenshot of the Automap’s example project “Demonstration” running in in Spatterlight (top picture, not lined up - and same thing happens in the Mac IDE) and in Lectrote (bottom picture, lined up). Gargoyle was printing question marks for me, so I didn’t take a picture of it.
I would guess the fixed width font you are using doesn’t have all the box drawing glyphs, and they are substituted from a proportional font.
Yes, this is a thing that the macOS text system does which breaks fixed-width font display in many applications.
@severedhand Do you happen to have any test code available?
MacOS reaches for different fonts to display different Unicode character ranges, and, as angstsmurf says, it’s not always consistent about width. (This is a problem even in MacOS Terminal windows.)
Lectrote uses the Chromium browser engine, which is why it behaves differently. Gargoyle uses the Freetype library and, as you saw, doesn’t support Unicode well at all.
I’ve never found a better solution than trying different Unicode characters until I find a set that work together.
Do you still want the code, @Angstsmurf? It’s really just the unmodified Automap “Demonstration” but with some of the unicode characters changed in the array by me.
Yes, please! I tried playing around with the automap extension on Github, but the unicode option made the map look pretty broken.
I’d like to see if I can find a font that works better, or if there is anything Spatterlight can do to improve the situation.
I think freemono has decent glyph coverage, it was the one I used as a base to make freefont3 for sfrotz.
Okay. I took the version of the extension that had been updated for 6L02 from here:
Then I renamed it automap 6m62 as I sought to make sure it was still working. And I started editing the Unicode character choices.
So I’ll paste
automap 6m62.i7x (54.8 KB)
the extension here. Just add The Demonstration from it to a blank project and hit Go.
Edit: Basically, I’d been remapping to the Box Grid section. Some of the characters were mapped there already, but I reduced the variety of wall types used to make sure walls that met (non-diagonally) would line up with each other.
Thanks! So far the character widths look fine in Spatterlight with the FreeMono font, but because the rooms are hyperlinks, Spatterlight will underline every character, which looks very strange:
I guess a switch to turn off hyperlink underline would be nice.
EDIT: Here’s with underline removed and line spacing set to -2:
Ah cool. So is this a thing where you (yourself) add that font to Spatterlight, and then it works?
Heh. Well, in my case, I’m also using Unified Glulx Input, and it has a different hyperlink mechanism, and it also can’t put hyperlinks outside the story window.
But for the greater good, yeah, I think it’d be cool if more people could & would use Automap (because it’s pretty much fire-and-forget - it’s great that way) and if the output could look good with Unicode. Probably it’s underused because it’s not in the public library. Also, I do think it’s tricky to ‘activate’. If you don’t reserve some rows in your own game, it’s mapping and there’s space where the map would be, but you don’t see no map. This is probably one of those things where the docs or extension just need to drive this point home more when you add it to a project.
I updated Spatterlight with a new built-in automap theme. Just select it in Preferences. The FreeMono font is included. Please report any bugs or other problems you notice.