GUI characters stick out in Japanese
Closed this issue · 1 comments
Describe the bug
Sneak+right-click on Edge Light to display GUI, text is overflowing in Japanese.
Screenshots
There's on PR #54.
I have confirmed that if I modify the following line, the characters will fit within the GUI when translated into Japanese, but if the translation is more than “Facing” characters in other languages, the characters may cover the switch on the left side, so it may be necessary to reduce the font if the number of characters exceeds a certain number.
Before:
After:
int stringWidth = font.width(string);
int directionWidth = font.width(player.getNearestViewDirection().toString());
int maxWidth = Math.max(stringWidth, directionWidth);
int x = guiLeft + xSize - maxWidth - 4;