You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: This is almost certainly the same as #396, however that thread suggests various causes/symptoms that I cannot reproduce and has been close half a year ago.
Summary
The default font renderer returns values from getStringWidth(String) that are smaller than expected for certain inputs using certain resource packs (with HD fonts).
Example
String text = "Login to ReplayMod.com"
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj;
int width = fontRenderer.getStringWidth(text); // width is 100 but probably should be 101
fontRenderer.listFormattedStringToWidth(text, width);
// ^ expected ["Login to ReplayMod.com"] but is ["Login to", "ReplayMod.com"]
fontRenderer.listFormattedStringToWidth(text, width + 1);
// ^ as expected ["Login to ReplayMod.com"]
width = fontRenderer.getStringWidth("*"); // width is 4 but probably should be 5
fontRenderer.listFormattedStringToWidth("*", width + 1);
// ^ As expected ["*"]
fontRenderer.listFormattedStringToWidth("*", width);
// ^ Throws StackOverflowException
Note: This is almost certainly the same as #396, however that thread suggests various causes/symptoms that I cannot reproduce and has been close half a year ago.
Summary
The default font renderer returns values from
getStringWidth(String)
that are smaller than expected for certain inputs using certain resource packs (with HD fonts).Example
Environment
Minecraft: 1.11.2
Optifine: 1.11.2_HD_U_C3
Forge: build 2366
No other mods (IntelliJ Remote Debugging for testing)
Resource Pack used for the Example: http://www.minecraftforum.net/forums/mapping-and-modding/resource-packs/1242763-conquest-wip-weekly-updates
The text was updated successfully, but these errors were encountered: