Skip to content

Commit ab337ad

Browse files
authored
Explicitly use FreeType font scanner with Fuchsia (flutter#179055)
Skia is removing the direct dependency of SkFontMgr_Fuchsia on FreeType. This means users must depend on and select the appropriate font scanner. Make previous implicit choice to use the FreeType font scanner explicit.
1 parent 05d6005 commit ab337ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

engine/src/flutter/txt/src/txt/platform_fuchsia.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <lib/zx/channel.h>
66

77
#include "third_party/skia/include/ports/SkFontMgr_fuchsia.h"
8+
#include "third_party/skia/include/ports/SkFontScanner_FreeType.h"
89
#include "txt/platform.h"
910

1011
#if defined(SK_FONTMGR_FREETYPE_EMPTY_AVAILABLE)
@@ -21,7 +22,8 @@ sk_sp<SkFontMgr> GetDefaultFontManager(uint32_t font_initialization_data) {
2122
if (font_initialization_data) {
2223
fuchsia::fonts::ProviderSyncPtr sync_font_provider;
2324
sync_font_provider.Bind(zx::channel(font_initialization_data));
24-
return SkFontMgr_New_Fuchsia(std::move(sync_font_provider));
25+
return SkFontMgr_New_Fuchsia(std::move(sync_font_provider),
26+
SkFontScanner_Make_FreeType());
2527
} else {
2628
#if defined(SK_FONTMGR_FREETYPE_EMPTY_AVAILABLE)
2729
static sk_sp<SkFontMgr> mgr = SkFontMgr_New_Custom_Empty();

0 commit comments

Comments
 (0)