aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkFontStyle.h
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-04-12 13:45:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-12 13:45:06 -0700
commit11a77c6e0634e2feb6fe4e74806db2fdd2a799ec (patch)
treed62d216858bbe136c4b41b9ec563ea35bd7ff1ed /include/core/SkFontStyle.h
parent0586f5cc9713268238394411a5daa2c7758b092b (diff)
Begin switch to SkFontStyle for legacy calls.
This adds SK_VERY_LEGACY_CREATE_TYPEFACE which, when defined, provides only the old interface. Ideally, everyone would switch directly to SkFontMgr and use one of the newer calls, but there is currently no path for current users to get there. This updates all the internals to use SkFontStyle, after switching these over the higher level APIs can be switched. The Chromium follow on patch can be seen at https://crrev.com/1877673002 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873923002 TBR=reed This doesn't really change API, just modernizes it. Review URL: https://codereview.chromium.org/1873923002
Diffstat (limited to 'include/core/SkFontStyle.h')
-rw-r--r--include/core/SkFontStyle.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/core/SkFontStyle.h b/include/core/SkFontStyle.h
index f42d7dd470..c18f956e94 100644
--- a/include/core/SkFontStyle.h
+++ b/include/core/SkFontStyle.h
@@ -43,8 +43,8 @@ public:
SkFontStyle();
SkFontStyle(int weight, int width, Slant);
- /** oldStyle means the style-bits in SkTypeface::Style: bold=1, italic=2 */
- explicit SkFontStyle(unsigned oldStyle);
+
+ static SkFontStyle FromOldStyle(unsigned oldStyle);
bool operator==(const SkFontStyle& rhs) const {
return fUnion.fU32 == rhs.fUnion.fU32;