aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fonts
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@google.com>2014-10-20 12:54:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-20 12:54:31 -0700
commit802ad83dca2efd57fde6c7ba666555ea78b5324c (patch)
treede3ef90d0e9906ee2c16388b58e17e12976d833b /src/fonts
parent43b8b36b20ae00e2d78421c4cda1f3f922983a20 (diff)
Revert of Replace SkTypeface::Style with SkFontStyle. (patchset #9 id:160001 of https://codereview.chromium.org/488143002/)
Reason for revert: CrOS GM failures: [*] 2 ExpectationsMismatch: fontmgr_iter_565.png fontmgr_iter_8888.png Original issue's description: > Replace SkTypeface::Style with SkFontStyle. > > Committed: https://skia.googlesource.com/skia/+/43b8b36b20ae00e2d78421c4cda1f3f922983a20 TBR=reed@google.com,bungeman@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/667023002
Diffstat (limited to 'src/fonts')
-rw-r--r--src/fonts/SkFontMgr_fontconfig.cpp2
-rw-r--r--src/fonts/SkGScalerContext.cpp2
-rw-r--r--src/fonts/SkTestScalerContext.cpp4
-rw-r--r--src/fonts/SkTestScalerContext.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/fonts/SkFontMgr_fontconfig.cpp b/src/fonts/SkFontMgr_fontconfig.cpp
index c56e065509..a7f81281c3 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?
- SkFontStyle style;
+ SkTypeface::Style style = SkTypeface::kNormal;
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 cacc27064f..34a788a9c9 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->fontStyle(), SkTypefaceCache::NewFontID(), false)
+ : SkTypeface(proxy->style(), SkTypefaceCache::NewFontID(), false)
, fProxy(SkRef(proxy))
, fPaint(paint) {}
diff --git a/src/fonts/SkTestScalerContext.cpp b/src/fonts/SkTestScalerContext.cpp
index b148375b09..ee379f0a38 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, const SkFontStyle& style)
+
+SkTestTypeface::SkTestTypeface(SkTestFont* testFont, SkTypeface::Style style)
: SkTypeface(style, SkTypefaceCache::NewFontID(), false)
, fTestFont(testFont) {
}
diff --git a/src/fonts/SkTestScalerContext.h b/src/fonts/SkTestScalerContext.h
index 3e6dc97ed1..42f604952f 100644
--- a/src/fonts/SkTestScalerContext.h
+++ b/src/fonts/SkTestScalerContext.h
@@ -57,7 +57,7 @@ private:
class SkTestTypeface : public SkTypeface {
public:
- SkTestTypeface(SkTestFont*, const SkFontStyle& style);
+ SkTestTypeface(SkTestFont* , SkTypeface::Style style);
virtual ~SkTestTypeface() {
SkSafeUnref(fTestFont);
}