diff options
author | bungeman <bungeman@google.com> | 2014-10-20 13:33:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-20 13:33:19 -0700 |
commit | a4c4a2d8cd65abb1e5ac20813831cdb9ace6c7ee (patch) | |
tree | cf64b94cb51a6316cf89080697cdd5d54e459ecc /src/fonts | |
parent | fca302ccf464933e44e00255654d27a7705abb7f (diff) |
Replace SkTypeface::Style with SkFontStyle.
Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20
Review URL: https://codereview.chromium.org/488143002
Diffstat (limited to 'src/fonts')
-rw-r--r-- | src/fonts/SkFontMgr_fontconfig.cpp | 2 | ||||
-rw-r--r-- | src/fonts/SkGScalerContext.cpp | 2 | ||||
-rw-r--r-- | src/fonts/SkTestScalerContext.cpp | 4 | ||||
-rw-r--r-- | src/fonts/SkTestScalerContext.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/fonts/SkFontMgr_fontconfig.cpp b/src/fonts/SkFontMgr_fontconfig.cpp index a7f81281c3..c56e065509 100644 --- a/src/fonts/SkFontMgr_fontconfig.cpp +++ b/src/fonts/SkFontMgr_fontconfig.cpp @@ -300,7 +300,7 @@ protected: } // TODO should the caller give us the style or should we get it from freetype? - SkTypeface::Style style = SkTypeface::kNormal; + SkFontStyle style; bool isFixedWidth = false; if (!SkTypeface_FreeType::ScanFont(stream, 0, NULL, &style, &isFixedWidth)) { return NULL; diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp index 34a788a9c9..cacc27064f 100644 --- a/src/fonts/SkGScalerContext.cpp +++ b/src/fonts/SkGScalerContext.cpp @@ -158,7 +158,7 @@ void SkGScalerContext::generateFontMetrics(SkPaint::FontMetrics* metrics) { #include "SkTypefaceCache.h" SkGTypeface::SkGTypeface(SkTypeface* proxy, const SkPaint& paint) - : SkTypeface(proxy->style(), SkTypefaceCache::NewFontID(), false) + : SkTypeface(proxy->fontStyle(), SkTypefaceCache::NewFontID(), false) , fProxy(SkRef(proxy)) , fPaint(paint) {} diff --git a/src/fonts/SkTestScalerContext.cpp b/src/fonts/SkTestScalerContext.cpp index ee379f0a38..b148375b09 100644 --- a/src/fonts/SkTestScalerContext.cpp +++ b/src/fonts/SkTestScalerContext.cpp @@ -110,8 +110,8 @@ void SkTestFont::init(const SkScalar* pts, const unsigned char* verbs) { fPaths[index] = path; } } - -SkTestTypeface::SkTestTypeface(SkTestFont* testFont, SkTypeface::Style style) + +SkTestTypeface::SkTestTypeface(SkTestFont* testFont, const SkFontStyle& style) : SkTypeface(style, SkTypefaceCache::NewFontID(), false) , fTestFont(testFont) { } diff --git a/src/fonts/SkTestScalerContext.h b/src/fonts/SkTestScalerContext.h index 42f604952f..3e6dc97ed1 100644 --- a/src/fonts/SkTestScalerContext.h +++ b/src/fonts/SkTestScalerContext.h @@ -57,7 +57,7 @@ private: class SkTestTypeface : public SkTypeface { public: - SkTestTypeface(SkTestFont* , SkTypeface::Style style); + SkTestTypeface(SkTestFont*, const SkFontStyle& style); virtual ~SkTestTypeface() { SkSafeUnref(fTestFont); } |