Chromium Code Reviews| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 case FontDescription::NoneKerning: | 175 case FontDescription::NoneKerning: |
| 176 m_typesettingFeatures &= ~WebCore::Kerning; | 176 m_typesettingFeatures &= ~WebCore::Kerning; |
| 177 break; | 177 break; |
| 178 case FontDescription::NormalKerning: | 178 case FontDescription::NormalKerning: |
| 179 m_typesettingFeatures |= WebCore::Kerning; | 179 m_typesettingFeatures |= WebCore::Kerning; |
| 180 break; | 180 break; |
| 181 case FontDescription::AutoKerning: | 181 case FontDescription::AutoKerning: |
| 182 break; | 182 break; |
| 183 } | 183 } |
| 184 | 184 |
| 185 switch (commonLigaturesState()) { | 185 // As per CSS (http://www.w3.org/TR/CSS2/text.html#propdef-letter-spacing), |
|
Inactive
2014/06/09 13:09:44
Please always point to the latest version of the s
h.joshi
2014/06/09 13:33:53
In "https://developer.mozilla.org/en-US/docs/Web/C
| |
| 186 case FontDescription::DisabledLigaturesState: | 186 // when the resultant space between two characters |
| 187 m_typesettingFeatures &= ~Ligatures; | 187 // is not the same as the default space, user agents should not use ligature s |
| 188 break; | 188 if (m_letterSpacing != 0) { |
| 189 case FontDescription::EnabledLigaturesState: | 189 switch (commonLigaturesState()) { |
| 190 m_typesettingFeatures |= Ligatures; | 190 case FontDescription::DisabledLigaturesState: |
| 191 break; | 191 m_typesettingFeatures &= ~Ligatures; |
| 192 case FontDescription::NormalLigaturesState: | 192 break; |
| 193 break; | 193 case FontDescription::EnabledLigaturesState: |
| 194 } | 194 m_typesettingFeatures |= Ligatures; |
| 195 break; | |
| 196 case FontDescription::NormalLigaturesState: | |
| 197 break; | |
| 198 } | |
| 195 | 199 |
| 196 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesState | 200 if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesSt ate |
| 197 || historicalLigaturesState() == FontDescription::EnabledLigaturesState | 201 || historicalLigaturesState() == FontDescription::EnabledLigaturesSt ate |
| 198 || contextualLigaturesState() == FontDescription::EnabledLigaturesState) { | 202 || contextualLigaturesState() == FontDescription::EnabledLigaturesSt ate) { |
| 199 m_typesettingFeatures |= WebCore::Ligatures; | 203 m_typesettingFeatures |= WebCore::Ligatures; |
| 204 } | |
| 200 } | 205 } |
| 201 } | 206 } |
| 202 | 207 |
| 203 } // namespace WebCore | 208 } // namespace WebCore |
| OLD | NEW |