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

Unified Diff: src/utils/win/SkDWrite.h

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/SkTypeface_win_dw.h ('k') | tests/FontMgrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/win/SkDWrite.h
diff --git a/src/utils/win/SkDWrite.h b/src/utils/win/SkDWrite.h
index 60e6a11984c326120130216a86b23ea0709c1167..ddcbc6c42613accf4cd89079ef82bf0a92d18e1d 100644
--- a/src/utils/win/SkDWrite.h
+++ b/src/utils/win/SkDWrite.h
@@ -90,23 +90,18 @@ public:
struct DWriteStyle {
explicit DWriteStyle(const SkFontStyle& pattern) {
- switch (pattern.slant()) {
- case SkFontStyle::kUpright_Slant:
- fSlant = DWRITE_FONT_STYLE_NORMAL;
- break;
- case SkFontStyle::kItalic_Slant:
- fSlant = DWRITE_FONT_STYLE_ITALIC;
- break;
- default:
- SkASSERT(false);
- }
-
fWeight = (DWRITE_FONT_WEIGHT)pattern.weight();
fWidth = (DWRITE_FONT_STRETCH)pattern.width();
+ switch (pattern.slant()) {
+ case SkFontStyle::kUpright_Slant: fSlant = DWRITE_FONT_STYLE_NORMAL ; break;
+ case SkFontStyle::kItalic_Slant: fSlant = DWRITE_FONT_STYLE_ITALIC ; break;
+ case SkFontStyle::kOblique_Slant: fSlant = DWRITE_FONT_STYLE_OBLIQUE; break;
+ default: SkASSERT(false); break;
+ }
}
- DWRITE_FONT_STYLE fSlant;
DWRITE_FONT_WEIGHT fWeight;
DWRITE_FONT_STRETCH fWidth;
+ DWRITE_FONT_STYLE fSlant;
};
#endif
« no previous file with comments | « src/ports/SkTypeface_win_dw.h ('k') | tests/FontMgrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698