Chromium Code Reviews| Index: include/core/SkTypeface.h |
| diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h |
| index 6a6d7241a2c861a1268ef992b5d87ed7b652d379..e2c97968e5961269260c56bde222e2740b5347ca 100644 |
| --- a/include/core/SkTypeface.h |
| +++ b/include/core/SkTypeface.h |
| @@ -16,6 +16,7 @@ |
| #include "SkWeakRefCnt.h" |
| class SkDescriptor; |
| +class SkFontData; |
| class SkFontDescriptor; |
| class SkScalerContext; |
| struct SkScalerContextRec; |
| @@ -281,6 +282,7 @@ public: |
| * The caller is responsible for deleting the stream. |
| */ |
| SkStreamAsset* openStream(int* ttcIndex) const; |
| + SkFontData* createFontData() const; |
|
bungeman-skia
2015/04/01 20:38:28
Maybe this guy should take an SkFontData* so he is
|
| /** |
| * Return a scalercontext for the given descriptor. If this fails, then |
| @@ -307,6 +309,8 @@ public: |
| } |
| protected: |
| + static SkTypeface* CreateFromFontData(SkFontData*); |
| + |
| /** uniqueID must be unique and non-zero |
| */ |
| SkTypeface(const SkFontStyle& style, SkFontID uniqueID, bool isFixedPitch = false); |
| @@ -326,6 +330,9 @@ protected: |
| uint32_t glyphIDsCount) const = 0; |
| virtual SkStreamAsset* onOpenStream(int* ttcIndex) const = 0; |
| + // TODO: make pure virtual. |
| + virtual SkFontData* onCreateFontData() const; |
| + |
| virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const = 0; |
| virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], |