Electroblob's Wizardry

Electroblob's Wizardry

18M Downloads

The Wizard's Handbook Typeset Chaos

Determancer opened this issue · 5 comments

commented

Minecraft version: 1.12.2
Wizardry version: 4.3
Environment: Singleplayer

Issue details: After translating into Chinese (Simplified), the typeset of The Wizard's Handbook is quite strange, always displays big space, and the hyperlinks sometimes also disappear. These problems are all over the book, and attempts to refine it even make things worse. It seems to be related to space (" ") and hyperlink (the "@" sign).
The translation completely follows the form of the original file (en_us).
The pictures about the problems above are attached below.
QQ图片20201026110820 (1)QQ图片20201026110827 (1)QQ图片20201026111033 (1)

commented

Right, finally got round to investigating this and I think I know why it's happening. This is actually nothing to do with hyperlinks specifically, it's because of how word wrap works:

In most languages, there are frequent spaces between words, but in the Chinese translation file there are only spaces after certain punctuation marks, or around hyperlinks. Notice how the same thing that is happening with the hyperlinks also happens with the : in the picture above. Minecraft isn't particularly clever with word wrapping so it just treats Chinese like any other language and wraps it based on what it thinks are 'words', which is anything with a space at both ends.

If anyone is interested here's an explanation https://devblogs.microsoft.com/oldnewthing/20160307-00/?p=93122

So... today I learned! Unfortunately I think this is partly a problem with vanilla Minecraft, it just happens to render most of the text correctly because it treats it as one long word. The handbook formatter doesn't require spaces around hyperlinks, so the simple solution is to just remove the spaces before and after hyperlinks, for example:

想要充能你的 @wands 魔杖@ ,

should be

想要充能你的@wands 魔杖@,

This can also be done after : characters and after format tags (#), excluding #recipe and #image.

@Determancer I can make these changes for you, but it'll be useful to know for future translations. I'll add a note to the translation guide to explain it.

commented

Thank you for your detailed explanation, I will remember this when translating.

commented

And yes, this is a problem of Vanilla Minecraft. Despite I tried the solution you have given, the format still went wrong. It seems like there is no choice but to accept the "gift" provided by Mojang (X

commented

Okay, it looks like the way hyperlinks are parsed doesn't work well with the unicode character set. I didn't change anything about the handbook in the update other than adding new chapters to it (which are only in english at the moment anyway), so this can't have been caused by the update.

Just to check, does it make any difference if you turn force unicode font on?

commented
  • Yes, the problem in fact has existed for some time, not caused by the Library Update.
  • Turn on force unicode font doesn't work, it looks just the same as before.