Reland "Add SkFontMgr implementation for Fuchsia"
This is a reland of 309f1deddf8ef0d5d2ce4f92c3be4c8ecd745b90
PS2 excludes the new file from Google3 build.
Original change's description:
> Add SkFontMgr implementation for Fuchsia
>
> The new SkFontMgr implementation will be used by Flutter and Chromium on
> Fuchsia.
>
> Change-Id: Ibd60a622282556e8557058e92fe865857f7024f9
> Reviewed-on: https://skia-review.googlesource.com/c/173800
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I1ea948b644dee4414b7a12a4b354f0a61a5e47ea
Reviewed-on: https://skia-review.googlesource.com/c/175431
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index b4cf3d3..0fade34 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -73,6 +73,7 @@
skia_use_freetype && !skia_use_fontconfig
skia_enable_fontmgr_custom_empty = is_fuchsia && skia_use_freetype
skia_enable_fontmgr_android = skia_use_expat && skia_use_freetype
+ skia_enable_fontmgr_fuchsia = is_fuchsia
if (is_android) {
skia_use_vulkan = defined(ndk_api) && ndk_api >= 24
@@ -411,6 +412,18 @@
]
}
+optional("fontmgr_fuchsia") {
+ enabled = skia_enable_fontmgr_fuchsia
+
+ deps = [
+ "//garnet/public/fidl/fuchsia.fonts",
+ ]
+ sources = [
+ "src/ports/SkFontMgr_fuchsia.cpp",
+ "src/ports/SkFontMgr_fuchsia.h",
+ ]
+}
+
optional("fontmgr_empty") {
enabled = skia_enable_fontmgr_empty
sources = [
@@ -854,6 +867,7 @@
":fontmgr_custom_empty",
":fontmgr_empty",
":fontmgr_fontconfig",
+ ":fontmgr_fuchsia",
":heif",
":hsw",
":jpeg",
@@ -983,9 +997,7 @@
}
if (skia_use_fonthost_mac) {
- sources += [
- "src/ports/SkFontHost_mac.cpp",
- ]
+ sources += [ "src/ports/SkFontHost_mac.cpp" ]
}
if (is_mac) {