diff --git a/Base/etc/WindowServer.ini b/Base/etc/WindowServer.ini index 5afbb8517c4..c672e286127 100644 --- a/Base/etc/WindowServer.ini +++ b/Base/etc/WindowServer.ini @@ -10,8 +10,8 @@ Height=768 ScaleFactor=1 [Fonts] -Default=Katica 10 400 -FixedWidth=Csilla 10 400 +Default=Katica 10 400 0 +FixedWidth=Csilla 10 400 0 [Theme] Name=Default diff --git a/Tests/LibGfx/BenchmarkGfxPainter.cpp b/Tests/LibGfx/BenchmarkGfxPainter.cpp index c7534dc4657..a9c8707c3d7 100644 --- a/Tests/LibGfx/BenchmarkGfxPainter.cpp +++ b/Tests/LibGfx/BenchmarkGfxPainter.cpp @@ -16,7 +16,7 @@ static struct FontDatabaseSpoofer { FontDatabaseSpoofer() { - Gfx::FontDatabase::the().set_default_font_query("Katica 10 400"sv); + Gfx::FontDatabase::the().set_default_font_query("Katica 10 400 0"sv); } } g_spoof; diff --git a/Tests/LibGfx/TestFontHandling.cpp b/Tests/LibGfx/TestFontHandling.cpp index a49f6648baa..5dad37a112b 100644 --- a/Tests/LibGfx/TestFontHandling.cpp +++ b/Tests/LibGfx/TestFontHandling.cpp @@ -14,7 +14,7 @@ TEST_CASE(test_fontdatabase_get_by_name) { - const char* name = "Liza 10 400"; + const char* name = "Liza 10 400 0"; auto& font_database = Gfx::FontDatabase::the(); EXPECT(!font_database.get_by_name(name)->name().is_null()); } @@ -22,7 +22,7 @@ TEST_CASE(test_fontdatabase_get_by_name) TEST_CASE(test_fontdatabase_get) { auto& font_database = Gfx::FontDatabase::the(); - EXPECT(!font_database.get("Liza", 10, 400)->name().is_null()); + EXPECT(!font_database.get("Liza", 10, 400, 0)->name().is_null()); } TEST_CASE(test_fontdatabase_for_each_font) diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp index b4961fbdd67..29b16be858f 100644 --- a/Userland/Libraries/LibGUI/TextEditor.cpp +++ b/Userland/Libraries/LibGUI/TextEditor.cpp @@ -609,7 +609,7 @@ void TextEditor::paint_event(PaintEvent& event) } auto font = unspanned_font; if (span.attributes.bold) { - if (auto bold_font = Gfx::FontDatabase::the().get(font->family(), font->presentation_size(), 700)) + if (auto bold_font = Gfx::FontDatabase::the().get(font->family(), font->presentation_size(), 700, 0)) font = bold_font; } draw_text_helper(span_start, span_end, font, span.attributes); diff --git a/Userland/Libraries/LibGUI/Widget.cpp b/Userland/Libraries/LibGUI/Widget.cpp index 78af0d96559..1fb396245bc 100644 --- a/Userland/Libraries/LibGUI/Widget.cpp +++ b/Userland/Libraries/LibGUI/Widget.cpp @@ -753,25 +753,25 @@ void Widget::set_font(const Gfx::Font* font) void Widget::set_font_family(const String& family) { - set_font(Gfx::FontDatabase::the().get(family, m_font->presentation_size(), m_font->weight())); + set_font(Gfx::FontDatabase::the().get(family, m_font->presentation_size(), m_font->weight(), m_font->slope())); } void Widget::set_font_size(unsigned size) { - set_font(Gfx::FontDatabase::the().get(m_font->family(), size, m_font->weight())); + set_font(Gfx::FontDatabase::the().get(m_font->family(), size, m_font->weight(), m_font->slope())); } void Widget::set_font_weight(unsigned weight) { - set_font(Gfx::FontDatabase::the().get(m_font->family(), m_font->presentation_size(), weight)); + set_font(Gfx::FontDatabase::the().get(m_font->family(), m_font->presentation_size(), weight, m_font->slope())); } void Widget::set_font_fixed_width(bool fixed_width) { if (fixed_width) - set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_fixed_width_font().family(), m_font->presentation_size(), m_font->weight())); + set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_fixed_width_font().family(), m_font->presentation_size(), m_font->weight(), m_font->slope())); else - set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_font().family(), m_font->presentation_size(), m_font->weight())); + set_font(Gfx::FontDatabase::the().get(Gfx::FontDatabase::the().default_font().family(), m_font->presentation_size(), m_font->weight(), m_font->slope())); } void Widget::set_min_size(const Gfx::IntSize& size) diff --git a/Userland/Libraries/LibGUI/Wizards/CoverWizardPage.cpp b/Userland/Libraries/LibGUI/Wizards/CoverWizardPage.cpp index cbc5f694272..72f297c761d 100644 --- a/Userland/Libraries/LibGUI/Wizards/CoverWizardPage.cpp +++ b/Userland/Libraries/LibGUI/Wizards/CoverWizardPage.cpp @@ -28,7 +28,7 @@ CoverWizardPage::CoverWizardPage() m_content_widget->layout()->set_margins(20); m_header_label = m_content_widget->add