From 9bd4add73445041547003d26ce42fcd57500bd5f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 15 May 2023 16:49:10 +0200 Subject: [PATCH] LibGfx: Make FontDatabase lookups case insensitive This seems mostly harmless and matches what CSS expects from us at the moment. Eventually our CSS font selection will become more sophisticated and stop relying on Gfx::FontDatabase for things like this, but for now it's a simple stopgap that lets websites do "font-family: arial" :^) --- Userland/Libraries/LibGfx/Font/FontDatabase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGfx/Font/FontDatabase.cpp b/Userland/Libraries/LibGfx/Font/FontDatabase.cpp index 59bd281f6c..36f892e24b 100644 --- a/Userland/Libraries/LibGfx/Font/FontDatabase.cpp +++ b/Userland/Libraries/LibGfx/Font/FontDatabase.cpp @@ -116,8 +116,8 @@ Font& FontDatabase::default_fixed_width_font() } struct FontDatabase::Private { - HashMap> full_name_to_font_map; - HashMap>> typefaces; + HashMap, CaseInsensitiveStringTraits> full_name_to_font_map; + HashMap>, CaseInsensitiveStringTraits> typefaces; }; void FontDatabase::load_all_fonts_from_path(DeprecatedString const& root)