From 62f5034ca0e45d4fa467d333c331b205596e5e15 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Thu, 28 Jul 2022 14:23:28 +0200 Subject: [PATCH] Fix char width for bold text --- pandalib-chat/src/main/java/fr/pandacube/lib/chat/ChatUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandalib-chat/src/main/java/fr/pandacube/lib/chat/ChatUtil.java b/pandalib-chat/src/main/java/fr/pandacube/lib/chat/ChatUtil.java index 49bea7d..feb0be8 100644 --- a/pandalib-chat/src/main/java/fr/pandacube/lib/chat/ChatUtil.java +++ b/pandalib-chat/src/main/java/fr/pandacube/lib/chat/ChatUtil.java @@ -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); }