aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkLua.cpp
diff options
context:
space:
mode:
authorGravatar mboc <mboc@opera.com>2016-05-31 11:42:36 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-31 11:42:37 -0700
commitee6a9919a362e16c1d84a870ce867d1ad7b8a141 (patch)
tree971189523fe82821c82a936cafaefd59b76338f7 /src/utils/SkLua.cpp
parentbfa9275968d11d459b30a485cedcb55c7fecf9d7 (diff)
SkTypeface::MakeFromName to take SkFontStyle.
SkTypeface::MakeFromName currently takes SkTypeface::Style, which is quite limited. This starts the transition to this function taking SkFontStyle instead. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043002 TBR=reed He said it sounded like a good idea. Review-Url: https://codereview.chromium.org/1818043002
Diffstat (limited to 'src/utils/SkLua.cpp')
-rw-r--r--src/utils/SkLua.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index 4409e477e5..98880d0154 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -2049,7 +2049,7 @@ static int lsk_newTypeface(lua_State* L) {
}
}
- sk_sp<SkTypeface> face(SkTypeface::MakeFromName(name, (SkTypeface::Style)style));
+ sk_sp<SkTypeface> face(SkTypeface::MakeFromName(name, SkFontStyle::FromOldStyle(style)));
// SkDebugf("---- name <%s> style=%d, face=%p ref=%d\n", name, style, face, face->getRefCnt());
if (nullptr == face) {
face = SkTypeface::MakeDefault();