anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
47 stars 16 forks source link

Thai characters that should display on another character takes full character space. #3736

Open munkeawtoast opened 8 months ago

munkeawtoast commented 8 months ago

Game Version

1.19.4

Platform

Mac

Modded

Vanilla

SP/MP

None

Description

Using same font family: Tahoma

Another problem that I suppose is caused by this bug: The word หนึ่ง in setting above First person mode FoV, there are two characters "ึ" and "่" (without the ring thing if you see the ring) that should be stacked on น but "่" is stacked on the space after "ึ"

Another bug? that i suppose is the same bug: In some fonts like Thonburi (Thai macOS UI font) instead of displaying correctly with a space behind, it displays the version with the ring with the characters on (to show that it's supposed to have a parent character to be on)

How to reproduce

Type text in language that has stacking characters or switch game's language to it.

Screenshots

Mac (abnormal):

macOS settings screenshot with Thai text display

Windows (normal): Windows settings screenshot with Thai text display

Another bug:

Screenshot 2567-03-19 at 20 57 49

Logs

No response

radfast commented 8 months ago

Can you try setting these settings different on a Mac, in clientsettings.json:

"defaultFontName": "sans-serif",
"decorativeFontName": "Lora",

Especially the "defaultFontName", you should set it to a good Thai characters font on Mac.

In Windows (in game version 1.19.5) the game will auto-switch to a good font (Leelawadee UI) when you choose Thai language setting. You can set back to another font by manually editing clientsettings.json if you prefer.

On Mac the developers did not know the best font name to suggest for Thai characters - you can suggest one if you want, and we can try it :) Best if it is a font which comes with the OS as standard, or else one which is so common that 99% of players in Thailand must already have it

munkeawtoast commented 8 months ago

I've tried changing it to all the system fonts and also ones I installed. I'm pretty sure that the font rendering system's to blame and not the fonts itself. Actually the exact same problem also exist in Minecraft to this days in every OS.

It might not be much but I once used this mod in the past to fix the issue. I've read into the code and it fixes by adjusting each Thai characters position manually so in case the problem arises in other languages this might not be the way to go.

As for the best looking font. I've tried every system fonts. and I think Thonburi looks the best and has the same style as Leelawadee's. as for decorative font, also Thonburi. Here's the "what it should look like in theory" comparison.

ภาพถ่ายหน้าจอ 2567-03-23 เวลา 01 09 32

and here's the in-game comparison, still bugged but i tried getting it to show the least bugged word. looks good to me. image

EDIT: I think defaultFontName's better light.