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

Unified Diff: src/ports/SkFontMgr_custom.cpp

Issue 1921903002: Add oblique as a slant. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase and add test. 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
Index: src/ports/SkFontMgr_custom.cpp
diff --git a/src/ports/SkFontMgr_custom.cpp b/src/ports/SkFontMgr_custom.cpp
index 20d6f78f7e801ed1800c426f97cd708d90f631c9..6401d5591432c25290f0f9b1b9825d94d61c6e58 100644
--- a/src/ports/SkFontMgr_custom.cpp
+++ b/src/ports/SkFontMgr_custom.cpp
@@ -149,7 +149,7 @@ public:
static int match_score(const SkFontStyle& pattern, const SkFontStyle& candidate) {
int score = 0;
score += (pattern.width() - candidate.width()) * 100;
- score += (pattern.isItalic() == candidate.isItalic()) ? 0 : 1000;
+ score += (pattern.slant() == candidate.slant()) ? 0 : 1000;
score += pattern.weight() - candidate.weight();
return score;
}

Powered by Google App Engine
This is Rietveld 408576698