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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 default: | 136 default: |
137 ASSERT_NOT_REACHED(); | 137 ASSERT_NOT_REACHED(); |
138 } | 138 } |
139 setItalic((traitsMask & FontStyleItalicMask) ? FontItalicOn : FontItalicOff)
; | 139 setItalic((traitsMask & FontStyleItalicMask) ? FontItalicOn : FontItalicOff)
; |
140 setSmallCaps((traitsMask & FontVariantSmallCapsMask) ? FontSmallCapsOn : Fon
tSmallCapsOff); | 140 setSmallCaps((traitsMask & FontVariantSmallCapsMask) ? FontSmallCapsOn : Fon
tSmallCapsOff); |
141 } | 141 } |
142 | 142 |
143 FontDescription FontDescription::makeNormalFeatureSettings() const | 143 FontDescription FontDescription::makeNormalFeatureSettings() const |
144 { | 144 { |
145 FontDescription normalDescription(*this); | 145 FontDescription normalDescription(*this); |
146 normalDescription.setFeatureSettings(0); | 146 normalDescription.setFeatureSettings(nullptr); |
147 return normalDescription; | 147 return normalDescription; |
148 } | 148 } |
149 | 149 |
150 float FontDescription::effectiveFontSize() const | 150 float FontDescription::effectiveFontSize() const |
151 { | 151 { |
152 float size = (RuntimeEnabledFeatures::subpixelFontScalingEnabled()) | 152 float size = (RuntimeEnabledFeatures::subpixelFontScalingEnabled()) |
153 ? computedSize() | 153 ? computedSize() |
154 : computedPixelSize(); | 154 : computedPixelSize(); |
155 | 155 |
156 // Ensure that the effective precision matches the font-cache precision. | 156 // Ensure that the effective precision matches the font-cache precision. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 break; | 220 break; |
221 case FontDescription::EnabledLigaturesState: | 221 case FontDescription::EnabledLigaturesState: |
222 m_typesettingFeatures |= Ligatures; | 222 m_typesettingFeatures |= Ligatures; |
223 break; | 223 break; |
224 case FontDescription::NormalLigaturesState: | 224 case FontDescription::NormalLigaturesState: |
225 break; | 225 break; |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 } // namespace WebCore | 229 } // namespace WebCore |
OLD | NEW |