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

On 14/8/13 16:48, Zack Weinberg wrote:
> On Wed, Aug 14, 2013 at 10:35 AM, John Daggett <jdaggett@mozilla.com> wrote:
>> 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.

JK

Received on Wednesday, 14 August 2013 18:22:38 UTC