From c054ffeb2b22a8b32704d76147370db028d650bf Mon Sep 17 00:00:00 2001 From: NeilGreenFly <1471761931@qq.com> Date: Sat, 27 Jun 2026 02:40:01 +0800 Subject: [PATCH] Fix the issue where the icon for UnlockableContent characters in the text isn't centered on the character (#12262) * Let the logic display enable allowRectanglePlacement. * Fix the issue where the icon for UnlockableContent characters in the text isn't centered on the character --- core/assets/contributors | 3 ++- core/src/mindustry/ui/Fonts.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/assets/contributors b/core/assets/contributors index 6f9a60b556..a11328d412 100644 --- a/core/assets/contributors +++ b/core/assets/contributors @@ -194,4 +194,5 @@ TheCuber Jovinull Alon 硫缺铅/PyratiteNoLead -Space \ No newline at end of file +Space +NeilGreenFly \ No newline at end of file diff --git a/core/src/mindustry/ui/Fonts.java b/core/src/mindustry/ui/Fonts.java index d71e88ff86..397b42b472 100644 --- a/core/src/mindustry/ui/Fonts.java +++ b/core/src/mindustry/ui/Fonts.java @@ -153,8 +153,8 @@ public class Fonts{ glyph.v = region.v2; glyph.u2 = region.u2; glyph.v2 = region.v; - glyph.xoffset = 0; - glyph.yoffset = -size; + glyph.xoffset = (size - glyph.width) / 2; + glyph.yoffset = (size - glyph.height) / 2 - size; glyph.xadvance = size; glyph.kerning = null; glyph.fixedWidth = true;