Bold and italic tags-related glitches

Create issue
Issue #56 new
Kill-o-matic created an issue

While testing these tags (in Linux under wine) I've noticed some systematic issues:

  • Using either bold or italic in music room comments causes anything on that line after the tag to be printed over it with a small offset to the right. This affects all supported games except th08 and th09. The same occasionally happens with dialogue text too (and possibly endings, I didn't test enough to run into it), but I can't reproduce it reliably.

  • Using bold on spell card titles breaks their alignment in-game, causing most to get cut off at the right edge. I believe this affects everything from th095 and on.

  • Using bold in the dialogue in games that have word bubbles (th128 and on) can cause the text to go out of the box.

  • The bold tag doesn't actually seem to do anything in th07 and th08 (except occasionally break the lines in th07 as noted above).

  • If you're still trying to maintain compatibility with's releases, their th13 patch breaks all tag recognition in the dialogue and endings, rendering them as plain text instead. Bold still causes the text to go out of the box though.

  • And finally, while not really a bug, it would be nice if you could nest tags inside one another, instead of having to tag each segment one by one with the effects you want. Well, there's no real use for it now, but anime fansubbers have proven you can do a lot with simple text modifiers.

Edit: One more thing I found while working on the endings - tags can't span multiple lines within the same translation unit, which I think counts as unexpected behaviour.

Comments (7)

  1. nmlgc repo owner

    This effectively boils down to 4 issues:

    • Bold and italic layout commands are being sort of mixed up with tabbing commands. As a result, their width is not calculated correctly when not used together with a tabbing command (try <bt$text> or <it$text>). This is a bug introduced in 2014-05-06.

    • The text width calculation function does not take layout commands into account. This has been bothering me as well, but I never got to fix it, not least because the layout system is not exactly the best piece of code in the engine.

    • Bold tags don't work in th06, th07 and th08 because the normal font used by the game already is bold, and the Windows GDI subsystem apparently is unable to synthesize an even bolder font. I am going to improve font replacement and rework the font configuration in the process of completing patch support for th143. Most likely, I'll end up choosing a different setup, using a font with regular weight, for the older games as well.

    • th13 uses two functions to render text and base_tsa only unpatches one of them. This has been fixed. And yes, as long as a certain licensing restriction is in place, it is definitely desirable to maintain compatibility to's patches.

    A proper restructuring of the layout code would solve the first two issues. Since the first one indeed classifies this as a bug that seems to impact translation decisions, I am going to focus on this for the next build. Maybe this will also facilitate nested tags.

  2. Kill-o-matic reporter

    Is there a list of all the available layout commands somewhere on the wiki?

    On the issue of fonts, while searching for a better replacement for my translations, I found the M+ FONTS. They are free, have 8000+ glyphs, in fullwidth, proportional and condensed proportional variants with 7 weights each. The only feature they really lack so far is proper italic, but they still get regularly updated. I've been trying out the M+ C subfamily and it seems to be a better drop-in replacement for most cases (especially in wine with all its font issues). If you can select different weights depending on the game, text type and screen mode, you could even get a pretty consistent look across 90% of translations. Anyway, just something to keep in mind unless you have better candidates.

  3. pivco

    Adding another occurrence from Th15 ending 5. See the Th15ED5.jpg. Removing the italics removed the glitch.

    For reference, the relevant part of ending's script from version from which the screenshot is taken is:

        "27_0": {
            "lines": [
                "While Sanae may have been oblivious to this,",
                "preventing such an event was praiseworthy for a native god."
        "28_0": {
            "lines": [
                "<i$This girl really does have it in her>, thought Kanako."
  4. Log in to comment