From 30dc68dd93905a93f4d0307a0454ce77a016503b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Mon, 29 Dec 2025 08:06:51 +0200 Subject: [PATCH] Fix binary BMFont flags handling. --- scene/resources/font.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 0a1104f9ce..d962c979f9 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -1508,13 +1508,15 @@ Error FontFile::_load_bitmap_font(const String &p_path, List *r_image_fi base_size = 16; } uint8_t flags = f->get_8(); - if (flags & (1 << 3)) { + //fixed_height = flags & (1 << 3); + if (flags & (1 << 4)) { st_flags.set_flag(TextServer::FONT_BOLD); } - if (flags & (1 << 2)) { + if (flags & (1 << 5)) { st_flags.set_flag(TextServer::FONT_ITALIC); } - unicode = (flags & 0x02); + unicode = flags & (1 << 6); + //smooth = flags & (1 << 7); uint8_t encoding_id = f->get_8(); // non-unicode charset if (!unicode) { switch (encoding_id) {