Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1117)

Unified Diff: src/ports/SkRemotableFontMgr_win_dw.cpp

Issue 1921903002: Add oblique as a slant. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: static_assert what can be. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ports/SkFontMgr_win_dw.cpp ('k') | src/ports/SkTypeface_win_dw.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkRemotableFontMgr_win_dw.cpp
diff --git a/src/ports/SkRemotableFontMgr_win_dw.cpp b/src/ports/SkRemotableFontMgr_win_dw.cpp
index cdf186c925fd66ecdc9e21187a1a5a1b775e6569..ea5562cfbcb294dd3962cb63ab5afee3836820ce 100644
--- a/src/ports/SkRemotableFontMgr_win_dw.cpp
+++ b/src/ports/SkRemotableFontMgr_win_dw.cpp
@@ -17,7 +17,7 @@
#include "SkString.h"
#include "SkTArray.h"
#include "SkTScopedComPtr.h"
-#include "SkTypeface_win.h"
+#include "SkTypeface_win_dw.h"
#include "SkTypes.h"
#include "SkUtils.h"
@@ -137,23 +137,7 @@ public:
fontId->fTtcIndex = fontFace->GetIndex();
// style
- SkFontStyle::Slant slant;
- switch (font->GetStyle()) {
- case DWRITE_FONT_STYLE_NORMAL:
- slant = SkFontStyle::kUpright_Slant;
- break;
- case DWRITE_FONT_STYLE_OBLIQUE:
- case DWRITE_FONT_STYLE_ITALIC:
- slant = SkFontStyle::kItalic_Slant;
- break;
- default:
- SkASSERT(false);
- }
-
- int weight = font->GetWeight();
- int width = font->GetStretch();
-
- fontId->fFontStyle = SkFontStyle(weight, width, slant);
+ fontId->fFontStyle = get_style(font);
return S_OK;
}
« no previous file with comments | « src/ports/SkFontMgr_win_dw.cpp ('k') | src/ports/SkTypeface_win_dw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698