Lack of HTML tag knowledge

I was under the impression that adding this tag

<font face='TADS-Typewriter'> blah blah </font>

would force the interpreter to display that block of text in a monospaced font, regardless of the user’s preference settings. However, I tried to use this tag to display an ASCII graphic (in the event that images aren’t supported) but QTads is still displaying the text in the main (non-monospaced) game font. (<font name = "Monaco">… didn’t seem to work either…)
Thanks if you can help!

1 Like

hey john,
that exact code of yours is working for me. which version of QTads are you using? i’m on 3.0.0.

oh, and do you have the correct fonts selected in the settings, under Fixed-width Font and Typewriter Font?

Sorry, it is working now! I don’t know what was up because I could’ve sworn I recompiled and all… maybe needed to restart the interpreter?
Related question if you happen to know: is the Monaco typeface standard on PC and Linux systems (coming from a Mac-only guy…)? Monaco’s square brackets put together look almost like little squares, which was helpful in my diagram. Is there a way to test whether the player’s system has Monaco font and hardcode that if so, and default to TADS-Typewriter only if that font isn’t loaded? Thanks!

Monaco isn’t a default font of either Windows or Linux, I’m afraid.
As far as I can tell, TADS is only able to inform you about the type of interpreter the game is running in, and if it’s able to change the font color (see systemInfo).
If you’re relying on HTML anyway, could you use actual images instead of trying to fake them?
Would you mind posting, or sending me a screenshot of what your diagram currently looks like?

Actually, that pretty much answers my question… if any interpreter that would recognize HTML tags would also display images, then what I’m trying to do is pointless. I did in fact draw the image for those interpreters that display images, I just wanted to know if I had an option for making sure that a non-image-supporting terp would display my alternative ASCII diagram in a monospaced font… but if a non-image terp doesn’t recognize HTML tags, are you just stuck hoping that they don’t try to display it with a non-monospace font?

There’s three types of TADS interpreters. Full multimedia terps (like htmlTADS and QTads), text-only UI terps (like Gargoyle), and text-mode terps (like t3run.exe and FrobTADS.)

You only need to worry about the second class: text-only UI terps. Gargoyle for example will only every use the single font configured by the user. And almost always, that’s a proportional font.

The other two terp classes will work fine. Multimedia terps will switch to a typewriter font if that’s what you specified in your HTML tags, and text-mode terps will always use fixed-width fonts for everything by definition, since they run inside a terminal.

However, you should be aware that TADS-typewriter is not actually guaranteed to be a fixed-width font! I mistakenly assumed that this must be fixed-width in older versions of QTads, but in the latest version every font is allowed. That’s because many typewriter-style fonts you can find on the net are proportional, as this is needed in order for them to more accurately emulate the look of a real, physical typewriter font face.

If you want a guarantee that you’ll get a fixed-width font, wrap that text inside <tt> and </tt> tags instead. This will use the interpreter’s “Fixed-width Font” setting instead of the “Typewriter Font” one.

1 Like

Thanks RealNC! Good to know how that works… and I had been wondering if there was a tag for specifically fixed-width and not just typewriter.

So basically, Gargoyle people just have to set their terp to a fixed-width font on their own inititiative, if they see a diagram that’s all misaligned?

Yes. But most people don’t like to play games in Gargoyle using a fixed-width font. You might want to print a warning about it at the start of the game if it runs within a text-only UI terp:

#include <tadsio.h>


if (systemInfo(SysInfoInterpClass) == SysInfoIClassTextGUI) {
    // print warning

The three terp classes are:

  • SysInfoIClassText - text-mode/terminal
  • SysInfoIClassTextGUI - text-only but with GUI and usually proportional fonts
  • SysInfoIClassHTML - full support for HTML TADS

So helpful, thanks!