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

Unified Diff: src/ports/SkFontMgr_android.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/SkFontHost_win.cpp ('k') | src/ports/SkFontMgr_custom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_android.cpp
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index ed5a4d53a78a016bde81ab47ec8009ac66a5f4d2..4aea047cdeee106cbffc401d4217fb638d8d0ad4 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -257,7 +257,7 @@ private:
static int match_score(const SkFontStyle& pattern, const SkFontStyle& candidate) {
int score = 0;
score += SkTAbs((pattern.width() - candidate.width()) * 100);
- score += SkTAbs((pattern.isItalic() == candidate.isItalic()) ? 0 : 1000);
+ score += SkTAbs((pattern.slant() == candidate.slant()) ? 0 : 1000);
score += SkTAbs(pattern.weight() - candidate.weight());
return score;
}
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | src/ports/SkFontMgr_custom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698