Pasting the char ( in any Textbox will make Text after it invisible. If you set it as World Name you still can use the world, but the Text in the Box is missing. This makes Worlds without Names possible.
Please note, that the char is not an open parenthese and you need to copy-paste it. The Directory created for the world contains this char and looks regular.
Linked issues
Attachments
Comments 16
Fix
FontRenderer.renderUnicodeChar(char c, boolean italic)
...
//int startColumn = this.glyphWidth[c] >>> 4;
int startColumn = (this.glyphWidth[c] >>> 4) & 15; // FIX
...
Tested on 1.4.7, works wonders.
Reason was that the byte for 'glyph width' is handled as unsigned value, whereas Java only does stuff as signed values (except 'char' of course) and bit-operations in 32-bit things. Before doing the bitshift (which does have the nice >>> op), it will sign-extend the byte. If the high nibble has large enough value (8..15), it basically means the byte has negative value, and thus the 32-bit integer being shifted is also negative and has 24 extra 1-bits on left. After the shift, such integer value converts into a very large positive value. The start column was thus calculated to be a very, very, very large thing, causing multiple problems, like rendered width to be millions of pixels. (The rest of text was thus way past the visible area.)
For that particular character used in the description: its codepoint is 65288, glyph width value -100 (or nibbles 9 and 12), and the shifted result for start column 268435449!
Duplicates MC-13046
Example of an empty name due to UTF-8 Bug