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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontTraits.h

Issue 1740593002: Use Skia's matchFamilyStyleCharacter API for font fallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 years, 9 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: third_party/WebKit/Source/platform/fonts/FontTraits.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontTraits.h b/third_party/WebKit/Source/platform/fonts/FontTraits.h
index 9fa46b1dc33d29d9db743b8ebe84d16995c0fa2e..d5e1e1a93b7cc7a53677a1b11f2617c3c5281b7b 100644
--- a/third_party/WebKit/Source/platform/fonts/FontTraits.h
+++ b/third_party/WebKit/Source/platform/fonts/FontTraits.h
@@ -46,6 +46,12 @@ enum FontWeight {
FontWeightBold = FontWeight700
};
+// Converts a FontWeight to its corresponding numeric value
+inline int numericFontWeight(FontWeight weight)
+{
+ return (weight - FontWeight100 + 1) * 100;
+}
+
// Numeric values matching OS/2 & Windows Metrics usWidthClass table.
// https://www.microsoft.com/typography/otspec/os2.htm
enum FontStretch {

Powered by Google App Engine
This is Rietveld 408576698