Index: Source/platform/fonts/FontDescription.cpp |
diff --git a/Source/platform/fonts/FontDescription.cpp b/Source/platform/fonts/FontDescription.cpp |
index a50c9019eb926db3eb48505c780233ed54144ccf..a59f8015d2c50ed8ddbb2766df0210484d67fffb 100644 |
--- a/Source/platform/fonts/FontDescription.cpp |
+++ b/Source/platform/fonts/FontDescription.cpp |
@@ -182,21 +182,26 @@ 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://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
|
+ // when the resultant space between two characters |
+ // is not the same as the default space, user agents should not use 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; |
+ } |
} |
} |