aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/win
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-04-27 10:21:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-27 10:21:05 -0700
commitb4bb7d825566042ed64697be49457dbac060e6c4 (patch)
treebaad2b4f5125674cc06c06a7d2dd04f7100379c4 /src/utils/win
parent12135f50bd8d7d8abbb2befb99a9784043cb90e5 (diff)
Add oblique as a slant.
Diffstat (limited to 'src/utils/win')
-rw-r--r--src/utils/win/SkDWrite.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/utils/win/SkDWrite.h b/src/utils/win/SkDWrite.h
index 60e6a11984..ddcbc6c426 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