When using unicode font with a symbol's width more than 8px, text floats to the left.
How to reproduce:
Take a resource pack from attachments.
Select the resource pack in the game.
Restart the game.
Change language to Pirate Speak, French, etc.
Linked issues
is duplicated by 2
Attachments
Comments 27
Thanks for reply Grum.
Ok. When I am using another font with a symbol's width 8px or less it looks good (screenshot 06). But if symbol's width is 10px (screenshot 07) then text floats to the left. I edit the file manually by hex-editor. What do I do wrong?
P.S. Same problem width default font and Hindi language (screenshot 08).
Test with this patch: https://www.dropbox.com/s/bkltsmz6o65zcwk/alignment.zip (for 1.6.2)
Also, this problem was solved in Forge after that commit: https://github.com/MinecraftForge/MinecraftForge/pull/1804
Its very easy to fix. Why Mojang employees ignore it, I do not understand.
Confirmed for
15w50a based on MC-27912
This is definitely valid, like @unknown said already in his comment these lines mess everything up. For example they return for both ① (\u2460) and ╬ (\u256c) the same size (force unicode is off) even though when writing one line of ① and below it one line of ╬ you will see that they have not the same size.
This is in the method getCharWidth(char p_78263_1_)
of the class /Client/src/net/minecraft/client/gui/FontRenderer.java
(MCP 1.8 names).
if (var4 > 7)
{
var4 = 15;
var3 = 0;
}
I think you need to work harder to reverse engineer the glyph_sizes.bin.