Index: src/core/SkTypeface.cpp |
diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp |
index 855ef909e8c4c17a53c60bb5b708086efbe94391..d768efc60365d8f972c39b66c00e4c522c1745bd 100644 |
--- a/src/core/SkTypeface.cpp |
+++ b/src/core/SkTypeface.cpp |
@@ -138,14 +138,7 @@ SkTypeface* SkTypeface::CreateFromTypeface(const SkTypeface* family, Style s) { |
} |
SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault()); |
- bool bold = s & SkTypeface::kBold; |
- bool italic = s & SkTypeface::kItalic; |
- SkFontStyle newStyle = SkFontStyle(bold ? SkFontStyle::kBold_Weight |
- : SkFontStyle::kNormal_Weight, |
- SkFontStyle::kNormal_Width, |
- italic ? SkFontStyle::kItalic_Slant |
- : SkFontStyle::kUpright_Slant); |
- return fm->matchFaceStyle(family, newStyle); |
+ return fm->matchFaceStyle(family, SkFontStyle::FromOldStyle(s)); |
} |
SkTypeface* SkTypeface::CreateFromStream(SkStreamAsset* stream, int index) { |