mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibGfx: Enable otf fonts
This commit is contained in:
parent
ce33376b56
commit
6e00a38099
Notes:
github-actions[bot]
2025-05-26 18:15:45 +00:00
Author: https://github.com/blukai 🔰
Commit: 6e00a38099
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4830
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 1 additions and 2 deletions
|
@ -31,8 +31,7 @@ void PathFontProvider::load_all_fonts_from_uri(StringView uri)
|
|||
root->for_each_descendant_file([this](Core::Resource const& resource) -> IterationDecision {
|
||||
auto uri = resource.uri();
|
||||
auto path = LexicalPath(uri.bytes_as_string_view());
|
||||
if (path.has_extension(".ttf"sv) || path.has_extension(".ttc"sv)) {
|
||||
// FIXME: What about .otf
|
||||
if (path.has_extension(".ttf"sv) || path.has_extension(".ttc"sv) || path.has_extension(".otf"sv)) {
|
||||
if (auto font_or_error = Typeface::try_load_from_resource(resource); !font_or_error.is_error()) {
|
||||
auto font = font_or_error.release_value();
|
||||
auto& family = m_typeface_by_family.ensure(font->family(), [] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue