aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontHost_FreeType_common.h
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2014-07-11 08:52:26 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-11 08:52:26 -0700
commit3a21d61668e0ac6529f9930669dd47be123ec333 (patch)
tree565b0873ebfdc37c75a4f8b4129aea7f878f6d04 /src/ports/SkFontHost_FreeType_common.h
parentf94bdb84ef267fade449bd154f8c3cef7011896e (diff)
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
Diffstat (limited to 'src/ports/SkFontHost_FreeType_common.h')
-rw-r--r--src/ports/SkFontHost_FreeType_common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h
index aef4d82044..f093dba8a5 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 @@ private:
};
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)