mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibWeb: Render otf fonts
This is required by WPT tests so we can validate the OpenType/features are properly implemented.
This commit is contained in:
parent
083f4f3d08
commit
6fd7b9b6b9
Notes:
github-actions[bot]
2024-12-17 18:08:12 +00:00
Author: https://github.com/jdahlin Commit: https://github.com/LadybirdBrowser/ladybird/commit/6fd7b9b6b98 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2197 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/kalenikaliaksandr Reviewed-by: https://github.com/tcl3
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ ErrorOr<NonnullRefPtr<Gfx::Typeface>> 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue