LibWeb: Avoid a FlyString->String->FlyString round-trip in StyleComputer

This commit is contained in:
Andreas Kling 2024-03-16 07:22:13 +01:00
parent 6724f840cd
commit 7da3b0dd7b
Notes: sideshowbarker 2024-07-16 23:08:48 +09:00

View File

@ -1695,7 +1695,7 @@ RefPtr<Gfx::FontCascadeList const> StyleComputer::font_matching_algorithm(FontFa
if (font_key_and_loader.key.family_name.equals_ignoring_ascii_case(key.family_name))
matching_family_fonts.empend(font_key_and_loader.key, const_cast<FontLoaderList*>(&font_key_and_loader.value));
}
Gfx::FontDatabase::the().for_each_typeface_with_family_name(key.family_name.to_string(), [&](Gfx::Typeface const& typeface) {
Gfx::FontDatabase::the().for_each_typeface_with_family_name(key.family_name, [&](Gfx::Typeface const& typeface) {
matching_family_fonts.empend(
FontFaceKey {
.family_name = typeface.family(),