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

Unified Diff: tests/FontMgrTest.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/utils/win/SkDWrite.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/FontMgrTest.cpp
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp
index 96af746ace7436d7f5f3425375a3ff38efc946ca..92dc18b1353959d23dabf96f45227f9046f5b299 100644
--- a/tests/FontMgrTest.cpp
+++ b/tests/FontMgrTest.cpp
@@ -110,7 +110,7 @@ static void test_fontiter(skiatest::Reporter* reporter, bool verbose) {
if (verbose) {
SkDebugf("\t[%d] %s [%3d %d %d]\n", j, sname.c_str(),
- fs.weight(), fs.width(), fs.isItalic());
+ fs.weight(), fs.width(), fs.slant());
}
}
}
@@ -185,10 +185,14 @@ static void test_matchStyleCSS3(skiatest::Reporter* reporter) {
SkFontStyle condensed_normal_900(SkFontStyle::kBlack_Weight, SkFontStyle::kCondensed_Width, SkFontStyle::kUpright_Slant);
SkFontStyle condensed_italic_100(SkFontStyle::kThin_Weight, SkFontStyle::kCondensed_Width, SkFontStyle::kItalic_Slant);
SkFontStyle condensed_italic_900(SkFontStyle::kBlack_Weight, SkFontStyle::kCondensed_Width, SkFontStyle::kItalic_Slant);
+ SkFontStyle condensed_obliqu_100(SkFontStyle::kThin_Weight, SkFontStyle::kCondensed_Width, SkFontStyle::kOblique_Slant);
+ SkFontStyle condensed_obliqu_900(SkFontStyle::kBlack_Weight, SkFontStyle::kCondensed_Width, SkFontStyle::kOblique_Slant);
SkFontStyle expanded_normal_100(SkFontStyle::kThin_Weight, SkFontStyle::kExpanded_Width, SkFontStyle::kUpright_Slant);
SkFontStyle expanded_normal_900(SkFontStyle::kBlack_Weight, SkFontStyle::kExpanded_Width, SkFontStyle::kUpright_Slant);
SkFontStyle expanded_italic_100(SkFontStyle::kThin_Weight, SkFontStyle::kExpanded_Width, SkFontStyle::kItalic_Slant);
SkFontStyle expanded_italic_900(SkFontStyle::kBlack_Weight, SkFontStyle::kExpanded_Width, SkFontStyle::kItalic_Slant);
+ SkFontStyle expanded_obliqu_100(SkFontStyle::kThin_Weight, SkFontStyle::kExpanded_Width, SkFontStyle::kOblique_Slant);
+ SkFontStyle expanded_obliqu_900(SkFontStyle::kBlack_Weight, SkFontStyle::kExpanded_Width, SkFontStyle::kOblique_Slant);
SkFontStyle normal_normal_100(SkFontStyle::kThin_Weight, SkFontStyle::kNormal_Width, SkFontStyle::kUpright_Slant);
SkFontStyle normal_normal_200(SkFontStyle::kExtraLight_Weight, SkFontStyle::kNormal_Width, SkFontStyle::kUpright_Slant);
@@ -462,16 +466,21 @@ static void test_matchStyleCSS3(skiatest::Reporter* reporter) {
},
{
- { expanded_normal_100,expanded_normal_900,expanded_italic_100,expanded_italic_900 },
+ { expanded_normal_100,expanded_normal_900,
+ expanded_italic_100,expanded_italic_900 },
{
{ condensed_normal_100, expanded_normal_100 },
{ condensed_normal_900, expanded_normal_900 },
{ condensed_italic_100, expanded_italic_100 },
{ condensed_italic_900, expanded_italic_900 },
+ { condensed_obliqu_100, expanded_italic_100 },
+ { condensed_obliqu_900, expanded_italic_900 },
{ expanded_normal_100, expanded_normal_100 },
{ expanded_normal_900, expanded_normal_900 },
{ expanded_italic_100, expanded_italic_100 },
{ expanded_italic_900, expanded_italic_900 },
+ { expanded_obliqu_100, expanded_italic_100 },
+ { expanded_obliqu_900, expanded_italic_900 },
},
},
@@ -626,6 +635,61 @@ static void test_matchStyleCSS3(skiatest::Reporter* reporter) {
{ normal_normal_600, invalidFontStyle },
},
},
+ {
+ { expanded_normal_100,expanded_normal_900,
+ expanded_italic_100,expanded_italic_900,
+ expanded_obliqu_100,expanded_obliqu_900, },
+ {
+ { condensed_normal_100, expanded_normal_100 },
+ { condensed_normal_900, expanded_normal_900 },
+ { condensed_italic_100, expanded_italic_100 },
+ { condensed_italic_900, expanded_italic_900 },
+ { condensed_obliqu_100, expanded_obliqu_100 },
+ { condensed_obliqu_900, expanded_obliqu_900 },
+ { expanded_normal_100, expanded_normal_100 },
+ { expanded_normal_900, expanded_normal_900 },
+ { expanded_italic_100, expanded_italic_100 },
+ { expanded_italic_900, expanded_italic_900 },
+ { expanded_obliqu_100, expanded_obliqu_100 },
+ { expanded_obliqu_900, expanded_obliqu_900 },
+ },
+ },
+ {
+ { expanded_normal_100,expanded_normal_900,
+ expanded_obliqu_100,expanded_obliqu_900, },
+ {
+ { condensed_normal_100, expanded_normal_100 },
+ { condensed_normal_900, expanded_normal_900 },
+ { condensed_italic_100, expanded_obliqu_100 },
+ { condensed_italic_900, expanded_obliqu_900 },
+ { condensed_obliqu_100, expanded_obliqu_100 },
+ { condensed_obliqu_900, expanded_obliqu_900 },
+ { expanded_normal_100, expanded_normal_100 },
+ { expanded_normal_900, expanded_normal_900 },
+ { expanded_italic_100, expanded_obliqu_100 },
+ { expanded_italic_900, expanded_obliqu_900 },
+ { expanded_obliqu_100, expanded_obliqu_100 },
+ { expanded_obliqu_900, expanded_obliqu_900 },
+ },
+ },
+ {
+ { expanded_italic_100,expanded_italic_900,
+ expanded_obliqu_100,expanded_obliqu_900, },
+ {
+ { condensed_normal_100, expanded_obliqu_100 },
+ { condensed_normal_900, expanded_obliqu_900 },
+ { condensed_italic_100, expanded_italic_100 },
+ { condensed_italic_900, expanded_italic_900 },
+ { condensed_obliqu_100, expanded_obliqu_100 },
+ { condensed_obliqu_900, expanded_obliqu_900 },
+ { expanded_normal_100, expanded_obliqu_100 },
+ { expanded_normal_900, expanded_obliqu_900 },
+ { expanded_italic_100, expanded_italic_100 },
+ { expanded_italic_900, expanded_italic_900 },
+ { expanded_obliqu_100, expanded_obliqu_100 },
+ { expanded_obliqu_900, expanded_obliqu_900 },
+ },
+ },
};
for (StyleSetTest& test : tests) {
« no previous file with comments | « src/utils/win/SkDWrite.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698