1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

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.
This commit is contained in:
thankyouverycool 2022-01-31 20:18:15 -05:00 committed by Andreas Kling
parent 87a149c9a4
commit 96895cd22c
15 changed files with 39 additions and 25 deletions

View file

@ -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)