FontEditor: Added quick and dirty support to add cyrrilic fonts.

This is a hack to support cyrillic text in serenity OS.
This commit is contained in:
Dmitrii Trifonov 2021-04-08 14:42:10 +03:00 committed by Andreas Kling
parent 323b7021bc
commit eb2b406173
Notes: sideshowbarker 2024-07-18 20:38:18 +09:00

View file

@ -107,6 +107,11 @@ int main(int argc, char** argv)
if (font->type() == Gfx::FontTypes::Default)
font->set_type(Gfx::FontTypes::LatinExtendedA);
// Convert 384 char font to 1280 char font.
// Dirty hack. Should be refactored.
if (font->type() == Gfx::FontTypes::LatinExtendedA)
font->set_type(Gfx::FontTypes::Cyrillic);
window->set_title(String::formatted("{} - Font Editor", path));
static_cast<FontEditorWidget*>(window->main_widget())->initialize(path, move(font));
};