W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [css3-text] when does 'letter-spacing' disable ligatures?

From: Alan Stearns <stearns@adobe.com>
Date: Wed, 14 Aug 2013 13:30:22 -0700
To: Jonathan Kew <jfkthame@googlemail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <CE3135C9.3D716%stearns@adobe.com>
On 8/14/13 11:22 AM, "Jonathan Kew" <jfkthame@googlemail.com> wrote:

>On 14/8/13 16:48, Zack Weinberg wrote:
>> On Wed, Aug 14, 2013 at 10:35 AM, John Daggett <jdaggett@mozilla.com>
>>> So if either 'letter-spacing: 0px' is set or somehow the combination
>>> of 'letter-spacing' plus added expansion/compression due to
>>> 'text-justify: auto' or 'text-justify: distribute' results in no
>>> additional spacing between letters, ligatures are enabled.  Any other
>>> non-normal value for 'letter-spacing' or when justification adds
>>> inter-character spacing, ligatures are disabled.
>>> The problem with this is that it leads to a rather ugly discontinuity,
>>> since ligatures typically don't have the same width as the underlying
>>> individual glyphs.
>>> See the example below:
>>> http://people.mozilla.org/~jdaggett/tests/letterspacinganimation.html
>> I don't like the discontinuity, but I expect there is likely to be
>> existing content that specifies 'letter-spacing:0' yet expects
>> ligatures, and I imagine that if (for instance) positive
>> letter-spacing is applied via transition on mouseover, ligatures would
>> still be desired in the base state.
>> It seems like it ought to be possible to fix this some other way.
>> What if we specify that a nonzero 'letter-spacing' disables optional
>> ligatures, but also adjusts the kerning of any group of letters that
>> would have been involved in a ligature, exactly enough to make the
>> overall advance width of the letter group continuous at
>> 'letter-spacing:0' if the ligature had been active?
>ISTM this would involve excessive complexity for an extremely marginal
>benefit. Moreover, when the letter-spacing adjustment is small (whether
>positive or negative), disabling the ligature and then kerning the
>glyphs to be spaced as if the ligature were active is liable to result
>in exactly the kind of ugly glyph clashes that ligatures such as "fi"
>are designed to mitigate.
>I think the appropriate solution to the jarring discontinuity seen when
>animating letter-spacing through zero, using a font that includes
>ligatures, is for the author to explicitly disable optional ligatures
>using the font-variant-ligatures or font-feature-settings property.

I agree with this assessment. I'd rather get ligatures when appropriate
(static display of text where the letter spacing is following the font's
metrics), and have authors explicitly turn them off in cases like this
animation. Losing ligatures for the static display case just to
accommodate animation seems like a bad choice.


Received on Wednesday, 14 August 2013 20:30:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:33 UTC