When you set Force Unicode: False
and try to write bold unicode characters like ∓
/tellraw @p {"text":"∓","bold":true}
You will get a doubled ∓.
The reason for that is that the method renderStringAtPos(String p_78255_1_, boolean p_78255_2_)
in the /Client/src/net/minecraft/client/gui/FontRenderer.java
class (MCP 1.8 names) sets a different offset for characters only if unicode is forced, however it ignores the fact that unicode characters can be displayed without unicode being forced. This offset would also affect the shadow of characters but this is disabled for unicode characters by default.
/**
* Render a single line string at the current (posX,posY) and update posX
*/
private void renderStringAtPos(String p_78255_1_, boolean p_78255_2_)
{
for (int var3 = 0; var3 < p_78255_1_.length(); ++var3)
{
char var4 = p_78255_1_.charAt(var3);
int var5;
int var6;
if (var4 == 167 && var3 + 1 < p_78255_1_.length())
{
//...
}
else
{
//...
// Changed this
//float var12 = this.unicodeFlag ? 0.5F : 1.0F;
float var12 = var4 == 0 || var5 == -1 || this.unicodeFlag ? 0.5F : 1.0F;
boolean var7 = (var4 == 0 || var5 == -1 || this.unicodeFlag) && p_78255_2_;
if (var7)
{
this.posX -= var12;
this.posY -= var12;
}
float var8 = this.renderCharAtPos(var5, var4, this.italicStyle);
if (var7)
{
this.posX += var12;
this.posY += var12;
}
if (this.boldStyle)
{
this.posX += var12;
if (var7)
{
this.posX -= var12;
this.posY -= var12;
}
this.renderCharAtPos(var5, var4, this.italicStyle);
this.posX -= var12;
if (var7)
{
this.posX += var12;
this.posY += var12;
}
++var8;
}
//...
}
}
}
Linked issues
is duplicated by 3
relates to 2
Attachments
Comments 9
Bold still looks pretty horrible because of the offset doubling method used. If the font supports "bold", why not use THAT font's "bold" from TTF?
Can confirm in 1.8.2-pre1.