| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 m_fields.m_typesettingFeatures &= ~blink::Kerning; | 200 m_fields.m_typesettingFeatures &= ~blink::Kerning; |
| 201 break; | 201 break; |
| 202 case FontDescription::NormalKerning: | 202 case FontDescription::NormalKerning: |
| 203 m_fields.m_typesettingFeatures |= blink::Kerning; | 203 m_fields.m_typesettingFeatures |= blink::Kerning; |
| 204 break; | 204 break; |
| 205 case FontDescription::AutoKerning: | 205 case FontDescription::AutoKerning: |
| 206 break; | 206 break; |
| 207 } | 207 } |
| 208 | 208 |
| 209 // As per CSS (http://dev.w3.org/csswg/css-text-3/#letter-spacing-property), | 209 // As per CSS (http://dev.w3.org/csswg/css-text-3/#letter-spacing-property), |
| 210 // When the effective letter-spacing between two characters is not zero (due t
o | 210 // When the effective letter-spacing between two characters is not zero (due |
| 211 // either justification or non-zero computed letter-spacing), user agents shou
ld | 211 // to either justification or non-zero computed letter-spacing), user agents |
| 212 // not apply optional ligatures. | 212 // should not apply optional ligatures. |
| 213 if (m_letterSpacing == 0) { | 213 if (m_letterSpacing == 0) { |
| 214 switch (commonLigaturesState()) { | 214 switch (commonLigaturesState()) { |
| 215 case FontDescription::DisabledLigaturesState: | 215 case FontDescription::DisabledLigaturesState: |
| 216 m_fields.m_typesettingFeatures &= ~blink::Ligatures; | 216 m_fields.m_typesettingFeatures &= ~blink::Ligatures; |
| 217 break; | 217 break; |
| 218 case FontDescription::EnabledLigaturesState: | 218 case FontDescription::EnabledLigaturesState: |
| 219 m_fields.m_typesettingFeatures |= blink::Ligatures; | 219 m_fields.m_typesettingFeatures |= blink::Ligatures; |
| 220 break; | 220 break; |
| 221 case FontDescription::NormalLigaturesState: | 221 case FontDescription::NormalLigaturesState: |
| 222 break; | 222 break; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 "FontStretchUltraCondensed should map to kUltraCondensed_Width"); | 298 "FontStretchUltraCondensed should map to kUltraCondensed_Width"); |
| 299 static_assert(static_cast<int>(FontStretchNormal) == | 299 static_assert(static_cast<int>(FontStretchNormal) == |
| 300 static_cast<int>(SkFontStyle::kNormal_Width), | 300 static_cast<int>(SkFontStyle::kNormal_Width), |
| 301 "FontStretchNormal should map to kNormal_Width"); | 301 "FontStretchNormal should map to kNormal_Width"); |
| 302 static_assert(static_cast<int>(FontStretchUltraExpanded) == | 302 static_assert(static_cast<int>(FontStretchUltraExpanded) == |
| 303 static_cast<int>(SkFontStyle::kUltraExpanded_Width), | 303 static_cast<int>(SkFontStyle::kUltraExpanded_Width), |
| 304 "FontStretchUltraExpanded should map to kUltraExpanded_Width"); | 304 "FontStretchUltraExpanded should map to kUltraExpanded_Width"); |
| 305 } | 305 } |
| 306 | 306 |
| 307 } // namespace blink | 307 } // namespace blink |
| OLD | NEW |