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

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

Issue 1883483002: Add code to call skia's matchFamilyStyleCharacter API, which uses the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fallbackproxy
Patch Set: Add expectation for font-fallback failure on Win7 and revert DEPS change 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: 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 be8bc58f9fcacbdcbf280e28b7b690cf90837e9d..fb2c16f0454a6cb30b1fa99d9c7d01c85531a015 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