mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 09:37:34 +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:
parent
3a45bba4e0
commit
f7d2392b6c
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ private:
|
||||||
auto mime_type = resource()->mime_type();
|
auto mime_type = resource()->mime_type();
|
||||||
if (mime_type == "font/ttf"sv || mime_type == "application/x-font-ttf"sv)
|
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()));
|
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()));
|
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());
|
auto ttf = OpenType::Font::try_load_from_externally_owned_memory(resource()->encoded_data());
|
||||||
if (!ttf.is_error())
|
if (!ttf.is_error())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue