LibGfx: Load fonts with .ttc extension in FontDatabase
That's required for emoji support on macOS where "Apple Color Emoji" font has TrueType Collection format.
This commit is contained in:
parent
67fe8d66b2
commit
c88e76add7
Notes:
github-actions[bot]
2024-09-06 12:31:45 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/c88e76add72 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1297 Reviewed-by: https://github.com/trflynn89
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ void FontDatabase::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)) {
|
||||
if (path.has_extension(".ttf"sv) || path.has_extension(".ttc"sv)) {
|
||||
// FIXME: What about .otf
|
||||
if (auto font_or_error = Typeface::try_load_from_resource(resource); !font_or_error.is_error()) {
|
||||
auto font = font_or_error.release_value();
|
||||
|
|
Loading…
Add table
Reference in a new issue