If CSS letter-spacing is used shaping makes very little sense and should be disabled. At least in the Qt implementation of applyTransforms(), letter spacing is also currently completely overriden.
Created attachment 208810 [details] Patch
Since we enable kerning by default in 5.1 this actually break CSS letter-spacing in most cases in 5.1.0. While not the most important CSS property, it is still a regression, so I plan to cherry-pick it for 5.1.1 or 5.1.2. What do you think jocelyn?
Quoting http://www.w3.org/TR/css-fonts-3/ : "If the ‘letter-spacing’ property is defined, kerning adjustments are considered part of the default spacing and letter spacing adjustments are made after kerning has been applied." So it seems like we should be handling it or set it as a limitation without affecting other ports.
(In reply to comment #3) > Quoting http://www.w3.org/TR/css-fonts-3/ : > > "If the ‘letter-spacing’ property is defined, kerning adjustments are considered part of the default spacing and letter spacing adjustments are made after kerning has been applied." > > So it seems like we should be handling it or set it as a limitation without affecting other ports. Okay, so it is defined for kerning, but I am still unsure about other types of shaping. Especially ones that tries for fuse the letters together. But I will change this to a Qt specific bug and let the complex path handle it.
Created attachment 208925 [details] Patch
Committed r154186: <http://trac.webkit.org/changeset/154186>
(In reply to comment #4) > (In reply to comment #3) > > Quoting http://www.w3.org/TR/css-fonts-3/ : > > > > "If the ‘letter-spacing’ property is defined, kerning adjustments are considered part of the default spacing and letter spacing adjustments are made after kerning has been applied." > > > > So it seems like we should be handling it or set it as a limitation without affecting other ports. > > Okay, so it is defined for kerning, but I am still unsure about other types of shaping. Especially ones that tries for fuse the letters together. > > But I will change this to a Qt specific bug and let the complex path handle it. You definitely would NOT want letter-spacing to cause Arabic letters to not be joined. There is a thread discussing this topic (in related to ligatures) at [1]. [1] http://lists.w3.org/Archives/Public/www-style/2013Aug/0211.html
(In reply to comment #7) > (In reply to comment #4) > > (In reply to comment #3) > > > Quoting http://www.w3.org/TR/css-fonts-3/ : > > > > > > "If the ‘letter-spacing’ property is defined, kerning adjustments are considered part of the default spacing and letter spacing adjustments are made after kerning has been applied." > > > > > > So it seems like we should be handling it or set it as a limitation without affecting other ports. > > > > Okay, so it is defined for kerning, but I am still unsure about other types of shaping. Especially ones that tries for fuse the letters together. > > > > But I will change this to a Qt specific bug and let the complex path handle it. > > You definitely would NOT want letter-spacing to cause Arabic letters to not be joined. There is a thread discussing this topic (in related to ligatures) at [1]. > > [1] http://lists.w3.org/Archives/Public/www-style/2013Aug/0211.html Well fortunately arabic and other joined scripts are all currently handled by the complex path. Fast font path can currently only handle kerning and ligatures. How should letter spacing handle ligatures, should be glyph-spacing or should it disable ligatures?