Fix char width for bold text

This commit is contained in:
Marc Baloup 2022-07-28 14:23:28 +02:00
parent fa708f4f12
commit 62f5034ca0
Signed by: marcbal
GPG Key ID: BBC0FE3ABC30B893

View File

@ -418,7 +418,7 @@ public class ChatUtil {
public static int charW(char c, boolean console, boolean bold) {
if (console)
return (c == '§') ? -1 : 1;
return CHAR_SIZES.getOrDefault(c, DEFAULT_CHAR_SIZE);
return CHAR_SIZES.getOrDefault(c, DEFAULT_CHAR_SIZE) + (bold ? 1 : 0);
}