PlayersCouncil / LotR-TCG_card_generator

nanDECK script for generating Lord of the Rings TCG cards from CSV.
6 stars 0 forks source link

Special characters in titles and subtitles #5

Closed morvael closed 4 years ago

morvael commented 4 years ago

Special characters in titles and subtitles doesn't work. Either when using automatic replacements, or writing them directly as html code.

morvael commented 4 years ago

Turns out problem is in converting lower case character with accent to upper case. í will end up as I, not Í. Using html code for upper case letter results in corrent rendering. Using html code for lower case letter or relying on lower case replacements will result in wrong character.

ketura commented 4 years ago

So this appears to be due to the HTML flag which sets the title/subtitle/type bar to use smallcaps, which apparently then actually treats the characters as actual uppercase, which is obviously a problem. I'm looking into it now.

ketura commented 4 years ago

The actual issue is that uppercase detection happens before the auto accent replacements, which then replaces e.g. Gloin with <titlecap>G</titlecap>loin, which of course doesn't match the existing set of search/replace pairs. This is going to take some clever jumping through hoops, but I think I can get both to work with each other.

ketura commented 4 years ago

Alright, with an update to nanDECK, this has now been addressed. Search/replace fields are all applied to all title, subtitle, card type, subtype, game text, and lore explicitly before any uppercase tagging is performed. The definitions in all_text_replacements.txt are a bit more streamlined as well. This will go out in the next release, probably in the next day or two here.