From 712ae60a6f28e02a7b049d0ead7ae6296fa30497 Mon Sep 17 00:00:00 2001 From: itsRevela Date: Mon, 23 Mar 2026 12:09:57 -0500 Subject: [PATCH] Fix unicode glyph color in per-vertex font rendering path The upstream font color fix (commit be7e2ca9) switched from glColor4f to per-vertex t->color() but renderUnicodeCharacter() still relied on glColor4f. Set glColor4f to currentColor before rendering unicode glyphs and restore white after, and re-apply t->color() when resuming the batched draw. --- Minecraft.Client/Font.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Minecraft.Client/Font.cpp b/Minecraft.Client/Font.cpp index 114b167e..0e833668 100644 --- a/Minecraft.Client/Font.cpp +++ b/Minecraft.Client/Font.cpp @@ -465,10 +465,15 @@ void Font::draw(const wstring &str, bool dropShadow, int initialColor) if (isUnicodeGlyphChar(c)) { t->end(); + // renderUnicodeCharacter uses its own begin/end and relies on glColor + glColor4f((currentColor >> 16 & 255) / 255.0F, (currentColor >> 8 & 255) / 255.0F, + (currentColor & 255) / 255.0F, (currentColor >> 24 & 255) / 255.0F); renderUnicodeCharacter(c); + glColor4f(1.0F, 1.0F, 1.0F, 1.0F); textures->bindTexture(m_textureLocation); lastBoundTexture = fontTexture; t->begin(); + t->color(currentColor & 0x00ffffff, (currentColor >> 24) & 255); } else {