Index: include/core/SkTypeface.h |
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h |
index 6a6d7241a2c861a1268ef992b5d87ed7b652d379..277bb0ddfd15a30f5dddfb2f001222dc31e60af9 100644 |
--- a/include/core/SkTypeface.h |
+++ b/include/core/SkTypeface.h |
@@ -17,6 +17,7 @@ |
class SkDescriptor; |
class SkFontDescriptor; |
+class SkFontParameters; |
class SkScalerContext; |
struct SkScalerContextRec; |
class SkStream; |
@@ -281,6 +282,7 @@ public: |
* The caller is responsible for deleting the stream. |
*/ |
SkStreamAsset* openStream(int* ttcIndex) const; |
+ SkStreamAsset* openStream2(SkFontParameters* params) const; |
bungeman-skia
2015/03/23 21:59:05
Passing around pointers means that 'NULL' is ambig
|
/** |
* Return a scalercontext for the given descriptor. If this fails, then |
@@ -307,6 +309,8 @@ public: |
} |
protected: |
+ static SkTypeface* CreateFromStream(SkStreamAsset* stream, const SkFontParameters& params); |
bungeman-skia
2015/03/23 21:59:04
Initially hiding this so no one other than seriali
|
+ |
/** uniqueID must be unique and non-zero |
*/ |
SkTypeface(const SkFontStyle& style, SkFontID uniqueID, bool isFixedPitch = false); |
@@ -326,6 +330,8 @@ protected: |
uint32_t glyphIDsCount) const = 0; |
virtual SkStreamAsset* onOpenStream(int* ttcIndex) const = 0; |
+ virtual SkStreamAsset* onOpenStream2(SkFontParameters* fontParams) const; |
+ |
virtual void onGetFontDescriptor(SkFontDescriptor*, bool* isLocal) const = 0; |
virtual int onCharsToGlyphs(const void* chars, Encoding, uint16_t glyphs[], |
@@ -356,6 +362,7 @@ private: |
friend class SkPDFCIDFont; |
friend class GrPathRendering; |
friend class GrGLPathRendering; |
+ friend class SkFontDescriptor; |
/** Retrieve detailed typeface metrics. Used by the PDF backend. |
@param perGlyphInfo Indicate what glyph specific information (advances, |