summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Seigo Nonaka <nona@google.com> 2021-05-10 00:37:40 -0700
committer Seigo Nonaka <nona@google.com> 2021-05-10 00:38:17 -0700
commitde1e019d56d364315188d8f5fbb285e972f86eab (patch)
tree8fd00df44b631904a5e71d0f7ee396bcbf2456cc
parent048fc0ae1a0b8d4707b7c836e0e03fc31c4d97be (diff)
Update usage of FontCollection interfaces.
Bug: 187358499 Test: m Change-Id: I2b1f001b3ebf7c297dae422c730d7052894e4394
-rw-r--r--native/android/system_fonts.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/native/android/system_fonts.cpp b/native/android/system_fonts.cpp
index 60b0f1eeaf72..9fe792958cef 100644
--- a/native/android/system_fonts.cpp
+++ b/native/android/system_fonts.cpp
@@ -329,7 +329,9 @@ AFont* _Nonnull AFontMatcher_match(
static_cast<minikin::FamilyVariant>(matcher->mFamilyVariant),
1 /* maxRun */);
- const std::shared_ptr<minikin::Font>& font = runs[0].fakedFont.font;
+ const std::shared_ptr<minikin::Font>& font =
+ fc->getBestFont(minikin::U16StringPiece(text, textLength), runs[0], matcher->mFontStyle)
+ .font;
std::unique_ptr<AFont> result = std::make_unique<AFont>();
const android::MinikinFontSkia* minikinFontSkia =
reinterpret_cast<android::MinikinFontSkia*>(font->typeface().get());