mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibGfx: Added dirty and raw cyrillic support for bitmap fonts.
This is a very quick and diry hack to implement support for cyrillic bitmap fonts.
This commit is contained in:
parent
2469e07784
commit
323b7021bc
2 changed files with 9 additions and 1 deletions
|
@ -145,6 +145,8 @@ RefPtr<BitmapFont> BitmapFont::load_from_memory(const u8* data)
|
|||
type = FontTypes::Default;
|
||||
else if (header.type == 1)
|
||||
type = FontTypes::LatinExtendedA;
|
||||
else if (header.type == 2)
|
||||
type = FontTypes::Cyrillic;
|
||||
else
|
||||
VERIFY_NOT_REACHED();
|
||||
|
||||
|
@ -166,6 +168,9 @@ size_t BitmapFont::glyph_count_by_type(FontTypes type)
|
|||
if (type == FontTypes::LatinExtendedA)
|
||||
return 384;
|
||||
|
||||
if (type == FontTypes::Cyrillic)
|
||||
return 1280;
|
||||
|
||||
dbgln("Unknown font type: {}", (int)type);
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue