TADS 3 Implementation in Gargoyle Not Supporting Certain Tags?

I can’t seem to get the <center> or <tt> tags to work at all in Gargoyle. For <tt> I even tried the workaround where you set the font to TADS-typewriter. Using <pre> interprets new lines and spaces very literally but also does not use monospace.

These worked fine in QTads. I’m on the Linux version of Gargoyle. Idk if I’m using stuff that’s known to be non-standard or what.

It’s not super necessary for this project, but might be in a future one.

Gargoyle does not support HTML TADS, so you get a pretty degraded modern TADS experience (QTads is, without a doubt, superior to Gargoyle at handling TADS).

HTML TADS support in Gargoyle isn’t a complete no-go, but it’s only slightly on the radar: Support Multimedia TADS, AKA HTML TADS · Issue #56 · garglk/garglk · GitHub

It looks like a lot of work, and given that Gargoyle is a Glk implementation, it may be hard to shoehorn some of the HTML TADS features into it. For the present, I recommend using QTads for any modern TADS game. Older TADS2 games (or any game which doesn’t use multimedia) should work just fine on Gargoyle, though.

1 Like

Thank you for the info, @cas! I appreciate it!

Gargoyle TADS also don’t support the italics, and this is an issue for me, because italics in non-interactive prose differentiate the thinking from actions and works, e.g.

The leading ganger looks at the rubble. What a mess. we will need five hours for removing this rubble and reopen the road. he then turn to the repair gangmen around him “Ok, guys, It’s an hard work, but if we work hard, we can do it in four or five hours”

the italic here is what the leading (and expert) ganger, think, assessing the situation at hand.

is obvious that italics, not only differentiate thinking from action/talk, but in an IF context, emphasized thinking is the best way to insert hints/clues/nudges in a relatively long text (let’s say, 5-8 80 char. lines) without fear of said hints/nudges being overlooked by players.

so, for at least two major work, I have sacrificed gargoyle compatibility, albeit I’m not enthusiast of having major projects dependant on a specific 'terp.

Best regards from Italy,
dott. Piergiorgio.

2 Likes

Which platform and version are you using for Gargoyle? Basic formatting using <i> (italics), <b> (bold) and <em> (also italic), and combinations is working fine for me in Gargoyle v2022.1 on macOS.

Comparison with Gargoyle on the left and QTads on the right:

(Edit: the “em tag” text was supposed to be just italic, I had a typo in my demo…)

2 Likes

Adding support for <font color=...> to Gargoyle seems easy enough: TADS3’s built-in HTML-to-text-mode-converter understands this tag, so it’s just a matter of filling in the os_set_text_color function in terps/tads/glk/osglk.c:

void os_set_text_color(os_color_t fg, os_color_t bg)
{
#if defined(GARGLK) || defined(GLK_MODULE_GARGLKTEXT)
    if (bg == OS_COLOR_P_TRANSPARENT) {
        garglk_set_zcolors(fg, zcolor_Current);
    } else {
        garglk_set_zcolors(fg, bg);
    }
#endif
}

(Although it might be better to use zcolor_Default instead of zcolor_Current, not sure.)

Adding support for <tt> also wouldn’t be hard but would require extending the TADS core source a bit, I don’t know what the Gargoyle team’s stance is on that.

1 Like

my bad again… I have mixed italics with underline (from my “scroll of styles” I noted this:

style markings:

<b> ... </b> - display text in bold (all three, frob, tadsr and qtads)
<i> ... </i> - display text in italics (only qtads and tadsr)
<u> ... </u> - display text underlined (only qtads)
<FONT COLOR=RED> ... </FONT> - display text in red. (only frob and qtads)

Luckly that I often xlate in english my field notes…)

In this Linux machine, tadsr is gargoyle tadsr, and the above came from the english version of my field notes.

My apologies for the mess, and
Best regards from Italy,
dott. Piergiorgio.

1 Like

I’ve actually got a branch that “supports” TADS colors here. Looks like I made it back in November 2021 and haven’t done much with it since, apart from periodic rebasing onto master. I’m not sure how well it works, but it’s effectively doing the same thing you recommended here. I can try to get around to testing again, and fixing any problems there may be, so we have color in the next release.

Gargoyle doesn’t support underlining text, mainly because Glk doesn’t; or rather, Glk only supports the concept of “emphasized” text, which could be either italics or underlined, and Gargoyle uses italics. The best that could be done without an extension is to treat underlined text as italics so it at least stands out, but of course that’s not ideal, since if you’re using underlining, you likely want it to actually be different than italics.

Color, as noted above, ought to be doable.

I have vague future plans for a Glk extension that would allow for underlined text, and anything else that can be specified through CSS. But it’s not high on my list yet.

For now it does seem like there are potentially some low hanging fruit that would allow for more to be supported. If anyone wants to work on it, if you send a pull request here then it will end up in Gargoyle, Lectrote, and Parchment.

2 Likes