Monospaced font is not monospaced in some z-code interpreters

I had a tester report that the monospaced font on his tablet was actually displayed as a proportional font. He did not specify what sort of tablet or what interpreter he was using. Is this a known issue? I would have thought that every interpreter supported monospaced fonts and many interpreters on old 8-bit and 16-bit computers only support monospaced fonts. This was encountered in a z-code game (z5) compiled with an Inform 6 compiler, but it could just as easily have been encountered with Inform 7, Dialog or ZIL.

I have asked him to check whether the fonts are configurable, as it may be configured to use a proportional font when it should be using a monospaced font.

1 Like

In Frotz it is configurable.

The interpreter doesn’t have to supply a monospaced font. For v4+, there’s a flag in the header which the interpreter uses to signal to the game whether it can show a monospaced font. You can read it in Inform 6 like this:

monospaced_available = ((0->1) & 16 > 0);
2 Likes

Ah, that’s good to know. Maybe I could use that.

Is it safe to assume that all z3 interpreters are monospaced?

I think even the earliest Mac interpreter by Infocom used a proportional font. That was probably a z3 interpreter.

1 Like

Relevant chapter in “The Z-Machine Standards Document”.

Checking in it ZIL would be something like:

<SET FIXED-FONT? <BAND <GETB 0 1> 16>>

Or as a routine:

<ROUTINE FIXED-FONT? () <BAND <GETB 0 1> 16>>>
1 Like

Yes. You can see screenshots: Starcross Screenshots for Macintosh - MobyGames

Infocom built special “updated for Mac” game files for several z3 games which added monospace flags on ASCII-art output. (E.g. Enchanter r16-s831118.z3 vs r16-s840518.z3.)

3 Likes

The culprit interpreter is Son of Hunky Punk version 1.8 running on Android devices. I wrote a little test program using @fredrik’s suggestion. Son of Hunky Punk lies to you. It tells you that it supports monospaced fonts, but it doesn’t. The configuration doesn’t allow you to select the monospaced font. I tried all the fonts supplied with it and none of them appear to be monospaced. It also appears to be joining double dashes into a single dash. I’m sure the previous version used to support a monospaced font.

I’m guessing that whoever did the update to the last version broke it in the process. They also broke a few other things at the same time. For example, they moved the path to the game files so that it could no longer find all your old game files and the path isn’t configurable. Tsk, tsk.

I tried it on Fabularium and the monospaced font works fine.

1 Like

If memory serves me, the earliest Mac z3 interpreters used - as you say - a proportional font, though you could change it. (They also refused to save to 800 KB floppies, and some of them used an “insert the original floppy” type of copy protection.)

Later z3 interpreters allowed you to change both the font and the font size. I remember spending some time in ResEdit, replacing the resource fork (and thus the interpreter) in the older ones with a newer one and adjusting the size of the game window so that I could get 80 columns.

The z4 and z5 interpreters used a mono-spaced font, and did not allow you to change it or its size. There must have been some different versions there too, because I remember the ones after Bureaucracy being much faster at outputting text.

The z6 interpreters used a proportional font, and did not allow you to change it or its size. Zork Zero used a monospaced font for the status line, but not for the game window. Not even where I’m pretty sure the game requested a monospaced font. (It could also be noticeably slow, to the point where it would print a “Please be patient…” message followed by a slowly growing line of periods. Once I think it got to almost the end of the line before waking up. Weird.)

1 Like