diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkFontStyle.h | 20 | ||||
-rw-r--r-- | include/core/SkTypeface.h | 2 |
2 files changed, 13 insertions, 9 deletions
diff --git a/include/core/SkFontStyle.h b/include/core/SkFontStyle.h index f4ffbb9675..643b69bd03 100644 --- a/include/core/SkFontStyle.h +++ b/include/core/SkFontStyle.h @@ -13,15 +13,17 @@ class SK_API SkFontStyle { public: enum Weight { - kThin_Weight = 100, - kExtraLight_Weight = 200, - kLight_Weight = 300, - kNormal_Weight = 400, - kMedium_Weight = 500, - kSemiBold_Weight = 600, - kBold_Weight = 700, - kExtraBold_Weight = 800, - kBlack_Weight = 900 + kInvisible_Weight = 0, + kThin_Weight = 100, + kExtraLight_Weight = 200, + kLight_Weight = 300, + kNormal_Weight = 400, + kMedium_Weight = 500, + kSemiBold_Weight = 600, + kBold_Weight = 700, + kExtraBold_Weight = 800, + kBlack_Weight = 900, + kExtraBlack_Weight = 1000 }; enum Width { diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h index 4f3879c6c2..83008d3abf 100644 --- a/include/core/SkTypeface.h +++ b/include/core/SkTypeface.h @@ -346,6 +346,8 @@ protected: /** Sets the fixedPitch bit. If used, must be called in the constructor. */ void setIsFixedPitch(bool isFixedPitch) { fIsFixedPitch = isFixedPitch; } + /** Sets the font style. If used, must be called in the constructor. */ + void setFontStyle(SkFontStyle style) { fStyle = style; } friend class SkScalerContext; static SkTypeface* GetDefaultTypeface(Style style = SkTypeface::kNormal); |