From eb2b406173a975900d3b658ab0199ad4cc0bb422 Mon Sep 17 00:00:00 2001 From: Dmitrii Trifonov Date: Thu, 8 Apr 2021 14:42:10 +0300 Subject: [PATCH] FontEditor: Added quick and dirty support to add cyrrilic fonts. This is a hack to support cyrillic text in serenity OS. --- Userland/Applications/FontEditor/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/Applications/FontEditor/main.cpp b/Userland/Applications/FontEditor/main.cpp index c18a0a14d9..eeddb83d5f 100644 --- a/Userland/Applications/FontEditor/main.cpp +++ b/Userland/Applications/FontEditor/main.cpp @@ -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(window->main_widget())->initialize(path, move(font)); };