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

LibWeb: Consider deprecated application/font-woff mime type

Though deprecated by IANA, `application/font-woff` is still in active
use as a MIME type for WOFF fonts by web servers throughout the wild
web.
This commit is contained in:
Mathis Wiehl 2023-03-18 12:44:45 +01:00 committed by Andreas Kling
parent 3a45bba4e0
commit f7d2392b6c

View file

@ -102,7 +102,7 @@ private:
auto mime_type = resource()->mime_type();
if (mime_type == "font/ttf"sv || mime_type == "application/x-font-ttf"sv)
return TRY(OpenType::Font::try_load_from_externally_owned_memory(resource()->encoded_data()));
if (mime_type == "font/woff"sv)
if (mime_type == "font/woff"sv || mime_type == "application/font-woff"sv)
return TRY(WOFF::Font::try_load_from_externally_owned_memory(resource()->encoded_data()));
auto ttf = OpenType::Font::try_load_from_externally_owned_memory(resource()->encoded_data());
if (!ttf.is_error())