Chicken-Bones / CodeChickenLib

GNU Lesser General Public License v2.1
65 stars 50 forks source link

GuiDraw.getStringWidth is incorrect for bold text #40

Closed squeek502 closed 9 years ago

squeek502 commented 9 years ago

Formatting codes are stripped before calculating width, meaning that bold text returns a smaller width than it should.

Relevant code: https://github.com/Chicken-Bones/CodeChickenLib/blob/master/src/codechicken/lib/gui/GuiDraw.java#L95-L99

See also https://github.com/MinecraftForge/MinecraftForge/issues/1660

Chicken-Bones commented 9 years ago

Must have been left from before bold text was added Fixed in 16f0b50920ea0133706eec87704071422bacc494 (1.7.10-1.1.3.135)