mojira.dev

Reality_SC

Assigned

No issues.

Reported

No issues.

Comments

For any minecraft version (and for Optifine too): replace bytes 10 07 A4 to 10 0F A4 in .class file containing "glyph_sizes.bin" string (these always only one such file in .jar).

Recently I found fixing solution that is appropriate for me. For not to decompile client just 1. Find .class containing "glyph_sizes.bin" string in bytecode — there always be only one file for any minecraft version (made from FontRenderer.java). 2. Find the bytes 10 07 A4 and replace them with 10 0F A4 with your favorite hex editor. These bytes are the code for "if(charWidth > 7)" so here we change it to "if(charWidth > 15)" that is never true. Working with Optifine bytecode too.

Can @rumickon reopen it? It does not works as should. To fix it in code @Grum should remove just one simple construction in "FontRenderer.java".

I've created my own textures for font letters and recalculated glyph_sizes.bin.
A lot of lettes are wider than 8px and thinner than 16px, but the game use it's own old algorythm: if(width > 7) width = 15;
Screenshot attached.
wtf? ((
WIll this be fixed anywhen?

I think Mojang should patch this cause this is a bug.
We can create patches for every version but this is not right way.

I've already found the problem and partial solution in minecraft's decompiled source.
https://mojang.atlassian.net/browse/MC-23952?focusedCommentId=113284#comment-113284

The only way to make it working is decompile .jar, find FontRenderer.java and comment this condition lines:
...
} else if (this.glyphWidth[ symbol ] != 0) {
int start = this.glyphWidth[ symbol ] >>> 4;
int stop = this.glyphWidth[ symbol ] & 15;
/* HERE:
if(stop > 7) { stop = 15; start = 0; }
*/
stop += 1;
return (stop - start) / 2 + 1;
} else {
...

I don't understand the aims of this condition.

I confirm the problem in 13w42b.

I created resourcepack with my own fonts and strictly edited (programmatically) glyph_width.bin file.
Fonts are rendered moved to the left.