mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibGfx: Enable otf fonts
This commit is contained in:
parent
ce33376b56
commit
6e00a38099
|
|
@ -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…
Reference in New Issue
Block a user