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 { |