OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com> | 2 * Copyright (C) 2007 Nicholas Shanks <contact@nickshanks.com> |
3 * Copyright (C) 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008 Apple 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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 case FontWeight600: | 89 case FontWeight600: |
90 case FontWeight700: | 90 case FontWeight700: |
91 case FontWeight800: | 91 case FontWeight800: |
92 case FontWeight900: | 92 case FontWeight900: |
93 return FontWeight900; | 93 return FontWeight900; |
94 } | 94 } |
95 ASSERT_NOT_REACHED(); | 95 ASSERT_NOT_REACHED(); |
96 return FontWeightNormal; | 96 return FontWeightNormal; |
97 } | 97 } |
98 | 98 |
99 FontDescription::Size FontDescription::largerSize(const Size& size) | |
100 { | |
101 return Size(0, size.value * 1.2, size.isAbsolute); | |
andersr
2014/08/15 12:40:42
Note a keyword size of '0' here, although the keyw
| |
102 } | |
103 | |
104 FontDescription::Size FontDescription::smallerSize(const Size& size) | |
105 { | |
106 return Size(0, size.value / 1.2, size.isAbsolute); | |
107 } | |
108 | |
99 FontTraits FontDescription::traits() const | 109 FontTraits FontDescription::traits() const |
100 { | 110 { |
101 return FontTraits(style(), variant(), weight(), stretch()); | 111 return FontTraits(style(), variant(), weight(), stretch()); |
102 } | 112 } |
103 | 113 |
104 FontDescription::VariantLigatures FontDescription::variantLigatures() const | 114 FontDescription::VariantLigatures FontDescription::variantLigatures() const |
105 { | 115 { |
106 VariantLigatures ligatures; | 116 VariantLigatures ligatures; |
107 | 117 |
108 ligatures.common = commonLigaturesState(); | 118 ligatures.common = commonLigaturesState(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 | 223 |
214 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt ate | 224 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt ate |
215 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt ate | 225 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt ate |
216 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt ate) { | 226 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt ate) { |
217 m_typesettingFeatures |= blink::Ligatures; | 227 m_typesettingFeatures |= blink::Ligatures; |
218 } | 228 } |
219 } | 229 } |
220 } | 230 } |
221 | 231 |
222 } // namespace blink | 232 } // namespace blink |
OLD | NEW |