Update find_name_and_attributes to take ttc index and rename to SkTypeface_FreeType::ScanFont.
The name 'ScanFont' is to mirror the naming convention of similar functions in FontConfig.
R=tomhudson@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/382053003
diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h
index aef4d82..f093dba 100644
--- a/src/ports/SkFontHost_FreeType_common.h
+++ b/src/ports/SkFontHost_FreeType_common.h
@@ -26,7 +26,6 @@
#define SkASSERT_CONTINUE(pred)
#endif
-
class SkScalerContext_FreeType_Base : public SkScalerContext {
protected:
// See http://freetype.sourceforge.net/freetype2/docs/reference/ft2-bitmap_handling.html#FT_Bitmap_Embolden
@@ -45,6 +44,13 @@
};
class SkTypeface_FreeType : public SkTypeface {
+public:
+ /** For SkFontMgrs to make use of our ability to extract
+ * name and style from a stream, using FreeType's API.
+ */
+ static bool ScanFont(SkStream* stream, int ttcIndex,
+ SkString* name, SkTypeface::Style* style, bool* isFixedPitch);
+
protected:
SkTypeface_FreeType(Style style, SkFontID uniqueID, bool isFixedPitch)
: INHERITED(style, uniqueID, isFixedPitch)