summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2022-01-31 20:18:15 -0500
committerAndreas Kling <kling@serenityos.org>2022-02-01 10:06:26 +0100
commit96895cd22c06cfa82c5cc2c03b091bd855e16e3b (patch)
treee299a45c1c0b188e794c1af24c6947c96f552c1e /Tests
parent87a149c9a42696c9df1bcbaf9fd4477db5df17d5 (diff)
downloadserenity-96895cd22c06cfa82c5cc2c03b091bd855e16e3b.zip
Everywhere: Fully qualify font names by including their slope
Fixes typefaces of the same weight but different slopes being incorrectly returned for each other by FontDatabase.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/LibGfx/BenchmarkGfxPainter.cpp2
-rw-r--r--Tests/LibGfx/TestFontHandling.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Tests/LibGfx/BenchmarkGfxPainter.cpp b/Tests/LibGfx/BenchmarkGfxPainter.cpp
index c7534dc465..a9c8707c3d 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 a49f6648ba..5dad37a112 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)