| Index: Source/platform/fonts/FontDescription.cpp
|
| diff --git a/Source/platform/fonts/FontDescription.cpp b/Source/platform/fonts/FontDescription.cpp
|
| index c98aac2e785f42ba763c6b6bd7bb3cb6912ac26b..4f84d9f0cc0e56498d016f843c5fd3ee7e361b4a 100644
|
| --- a/Source/platform/fonts/FontDescription.cpp
|
| +++ b/Source/platform/fonts/FontDescription.cpp
|
| @@ -182,21 +182,27 @@ void FontDescription::updateTypesettingFeatures() const
|
| break;
|
| }
|
|
|
| - switch (commonLigaturesState()) {
|
| - case FontDescription::DisabledLigaturesState:
|
| - m_typesettingFeatures &= ~Ligatures;
|
| - break;
|
| - case FontDescription::EnabledLigaturesState:
|
| - m_typesettingFeatures |= Ligatures;
|
| - break;
|
| - case FontDescription::NormalLigaturesState:
|
| - break;
|
| - }
|
| -
|
| - if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesState
|
| - || historicalLigaturesState() == FontDescription::EnabledLigaturesState
|
| - || contextualLigaturesState() == FontDescription::EnabledLigaturesState) {
|
| - m_typesettingFeatures |= WebCore::Ligatures;
|
| + // As per CSS (http://dev.w3.org/csswg/css-text-3/#letter-spacing-property),
|
| + // When the effective letter-spacing between two characters is not zero (due to
|
| + // either justification or non-zero computed letter-spacing), user agents should
|
| + // not apply optional ligatures.
|
| + if (m_letterSpacing == 0) {
|
| + switch (commonLigaturesState()) {
|
| + case FontDescription::DisabledLigaturesState:
|
| + m_typesettingFeatures &= ~Ligatures;
|
| + break;
|
| + case FontDescription::EnabledLigaturesState:
|
| + m_typesettingFeatures |= Ligatures;
|
| + break;
|
| + case FontDescription::NormalLigaturesState:
|
| + break;
|
| + }
|
| +
|
| + if (discretionaryLigaturesState() == FontDescription::EnabledLigaturesState
|
| + || historicalLigaturesState() == FontDescription::EnabledLigaturesState
|
| + || contextualLigaturesState() == FontDescription::EnabledLigaturesState) {
|
| + m_typesettingFeatures |= WebCore::Ligatures;
|
| + }
|
| }
|
| }
|
|
|
|
|