Centering Images/Text on Various Interpreters

If the interpreter supplies good defaults (making them all distinct), I think it should be okay for most works: it’s not a huge change to the Counterfeit Monkey experience if User2 is green instead of blue, for example, as long as it’s distinct from Normal.

In my experience, the styles are generally interpreted as:

  • Normal is roman type
  • Emphasized is italic type
  • Preformatted is fixed-width type
  • Subheader is bold type

Conveniently, these are the four inline styles that the Z-machine supports.

Then:

  • Header, Alert, Note, BlockQuote, Input are occasionally used by the library but otherwise ignored; I know I’ve repurposed Alert as “extra emphasized” (bold italic) and Note as “de-emphasized” (lightweight) but never made much use of this at all.
  • User1 and User2 are used for different colors the game needs, like in Threaded Conversation. I think Blue Lacuna used this for keywords in the text also?

So if the default is roman, italic, fixed-width, bold, [anything really], and then two different arbitrary colors, I don’t think removing style hints will cause noticeable changes to most games. The one thing the Z-machine can do that Glk can’t is fancy colors, and the Garglk color extension seems to be catching on to cover that need.

While the User1 and User2 styles aren’t enough to do something like Photopia (without closing and reopening the main window several times), it does seem true that most games can get by with only a couple special inline styles (e.g. “this is an interactible keyword” and “this is an error message from the parser rather than the simulated world”), and any way of making them distinct will have pretty much the same effect. So while I was originally skeptical, over the years I’ve slowly been won over on them.

The one thing style hints are really necessary for, then, is messing with text justification. Hence this thread. And this seems like a generally different use case than the rest of the style system. A convention to make, say, Header style centered could work (since that’s not a style that’s generally used inline), but I suppose it would come down to how much centering is really used in text windows (as opposed to the status window), and for what purposes.

1 Like