diff options
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r-- | include/core/SkPaint.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index 0ec6698..1715013 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -665,6 +665,25 @@ public: @param locale set the paint's locale value for drawing text. */ void setTextLocale(const SkString& locale); + + + enum FontVariant { + kDefault_Variant, // Currently setting yourself to Default gives you Compact Variant + kCompact_Variant, + kElegant_Variant, + kLast_Variant = kElegant_Variant, + }; + + /** Return the font variant + @return the font variant used by this paint object + */ + FontVariant getFontVariant() const { return fFontVariant; } + + + /** Set the font variant + @param fontVariant set the paint's font variant for choosing fonts + */ + void setFontVariant(FontVariant fontVariant); #endif /** Return the paint's text size. @@ -861,10 +880,6 @@ public: SkPath* path) const; #ifdef SK_BUILD_FOR_ANDROID - - enum FontVariant { - kElegant_Variant, - }; const SkGlyph& getUnicharMetrics(SkUnichar); const SkGlyph& getGlyphMetrics(uint16_t); const void* findImage(const SkGlyph&); @@ -910,6 +925,7 @@ private: unsigned fHinting : 2; #ifdef SK_BUILD_FOR_ANDROID SkString fTextLocale; + FontVariant fFontVariant; #endif SkDrawCacheProc getDrawCacheProc() const; |