Fix binary BMFont flags handling.

This commit is contained in:
Pāvels Nadtočajevs
2025-12-29 08:06:51 +02:00
parent 63227bbc8a
commit 30dc68dd93

View File

@@ -1508,13 +1508,15 @@ Error FontFile::_load_bitmap_font(const String &p_path, List<String> *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) {