Add onGetFamilyName to SkTypeface.
This speeds up and documents this particular feature of SkTypeface
and also frees up SkFontDescriptor to be used only in serialization.
R=reed@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/574873002
diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp
index e543fdb..34a788a 100644
--- a/src/fonts/SkGScalerContext.cpp
+++ b/src/fonts/SkGScalerContext.cpp
@@ -206,6 +206,10 @@
return fProxy->getUnitsPerEm();
}
+void SkGTypeface::onGetFamilyName(SkString* familyName) const {
+ fProxy->getFamilyName(familyName);
+}
+
SkTypeface::LocalizedStrings* SkGTypeface::onCreateFamilyNameIterator() const {
return fProxy->createFamilyNameIterator();
}