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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 28 matching lines...) Expand all
39 FontWeight400 = 3, 39 FontWeight400 = 3,
40 FontWeight500 = 4, 40 FontWeight500 = 4,
41 FontWeight600 = 5, 41 FontWeight600 = 5,
42 FontWeight700 = 6, 42 FontWeight700 = 6,
43 FontWeight800 = 7, 43 FontWeight800 = 7,
44 FontWeight900 = 8, 44 FontWeight900 = 8,
45 FontWeightNormal = FontWeight400, 45 FontWeightNormal = FontWeight400,
46 FontWeightBold = FontWeight700 46 FontWeightBold = FontWeight700
47 }; 47 };
48 48
49 // Converts a FontWeight to its corresponding numeric value
50 inline int numericFontWeight(FontWeight weight)
51 {
52 return (weight - FontWeight100 + 1) * 100;
53 }
54
49 // Numeric values matching OS/2 & Windows Metrics usWidthClass table. 55 // Numeric values matching OS/2 & Windows Metrics usWidthClass table.
50 // https://www.microsoft.com/typography/otspec/os2.htm 56 // https://www.microsoft.com/typography/otspec/os2.htm
51 enum FontStretch { 57 enum FontStretch {
52 FontStretchUltraCondensed = 1, 58 FontStretchUltraCondensed = 1,
53 FontStretchExtraCondensed = 2, 59 FontStretchExtraCondensed = 2,
54 FontStretchCondensed = 3, 60 FontStretchCondensed = 3,
55 FontStretchSemiCondensed = 4, 61 FontStretchSemiCondensed = 4,
56 FontStretchNormal = 5, 62 FontStretchNormal = 5,
57 FontStretchSemiExpanded = 6, 63 FontStretchSemiExpanded = 6,
58 FontStretchExpanded = 7, 64 FontStretchExpanded = 7,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 unsigned m_weight : 4; 115 unsigned m_weight : 4;
110 unsigned m_stretch : 4; 116 unsigned m_stretch : 4;
111 unsigned m_filler : 21; 117 unsigned m_filler : 21;
112 } m_traits; 118 } m_traits;
113 FontTraitsBitfield m_bitfield; 119 FontTraitsBitfield m_bitfield;
114 }; 120 };
115 }; 121 };
116 122
117 } // namespace blink 123 } // namespace blink
118 #endif // FontTraits_h 124 #endif // FontTraits_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698