From 6fd7b9b6b98f4aadff43c350d82bd7e52e366b6a Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 5 Dec 2024 01:18:54 +0100 Subject: [PATCH] LibWeb: Render otf fonts This is required by WPT tests so we can validate the OpenType/features are properly implemented. --- Libraries/LibWeb/CSS/StyleComputer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/CSS/StyleComputer.cpp b/Libraries/LibWeb/CSS/StyleComputer.cpp index 8b1ad246ca9..51db1789c4f 100644 --- a/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -260,7 +260,7 @@ ErrorOr> FontLoader::try_load_font() mime_type = MimeSniff::Resource::sniff(resource()->encoded_data(), Web::MimeSniff::SniffingConfiguration { .sniffing_context = Web::MimeSniff::SniffingContext::Font }); } if (mime_type.has_value()) { - if (mime_type->essence() == "font/ttf"sv || mime_type->essence() == "application/x-font-ttf"sv) { + if (mime_type->essence() == "font/ttf"sv || mime_type->essence() == "application/x-font-ttf"sv || mime_type->essence() == "font/otf"sv) { if (auto result = Gfx::Typeface::try_load_from_externally_owned_memory(resource()->encoded_data()); !result.is_error()) { return result; }