Support variable font family
A variable font family sets the requested weight and italic style
axes before passing down to the rendering pipeline.
Also, add more accessors to the PositionedGlyph APIs for knowing
fake bold/italic information as well as wght/ital overrides.
Bug: 281769620
Test: minikin_tests
Test: atest CtsTextTestCases:android.text.cts.VariableFamilyTest
Change-Id: I4a4770bf185a1c21113a293fe3d831573411ec26
diff --git a/libs/hwui/jni/FontFamily.cpp b/libs/hwui/jni/FontFamily.cpp
index 69774cc..af1668f 100644
--- a/libs/hwui/jni/FontFamily.cpp
+++ b/libs/hwui/jni/FontFamily.cpp
@@ -89,7 +89,8 @@
}
std::shared_ptr<minikin::FontFamily> family = minikin::FontFamily::create(
builder->langId, builder->variant, std::move(builder->fonts),
- true /* isCustomFallback */, false /* isDefaultFallback */);
+ true /* isCustomFallback */, false /* isDefaultFallback */,
+ minikin::VariationFamilyType::None);
if (family->getCoverage().length() == 0) {
return 0;
}