impl charsToGlyphs for freetype
BUG=
R=bungeman@google.com
Review URL: https://codereview.chromium.org/18040004
git-svn-id: http://skia.googlecode.com/svn/trunk@9866 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h
index acf9a4a..6bd3532 100644
--- a/src/ports/SkFontHost_FreeType_common.h
+++ b/src/ports/SkFontHost_FreeType_common.h
@@ -48,7 +48,9 @@
class SkTypeface_FreeType : public SkTypeface {
protected:
SkTypeface_FreeType(Style style, SkFontID uniqueID, bool isFixedPitch)
- : INHERITED(style, uniqueID, isFixedPitch) {}
+ : INHERITED(style, uniqueID, isFixedPitch)
+ , fGlyphCount(-1)
+ {}
virtual SkScalerContext* onCreateScalerContext(
const SkDescriptor*) const SK_OVERRIDE;
@@ -58,7 +60,13 @@
const uint32_t*, uint32_t) const SK_OVERRIDE;
virtual int onGetUPEM() const SK_OVERRIDE;
+ virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[],
+ int glyphCount) const SK_OVERRIDE;
+ virtual int onCountGlyphs() const SK_OVERRIDE;
+
private:
+ mutable int fGlyphCount;
+
typedef SkTypeface INHERITED;
};