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

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

From: Zack Weinberg <zackw@panix.com>
Date: Wed, 14 Aug 2013 11:48:54 -0400
Message-ID: <CAKCAbMgaz2sCmmMeR2+NS-w06skLFWmH7=EBMP1HV=Qtg8yGRA@mail.gmail.com>
To: John Daggett <jdaggett@mozilla.com>
Cc: www-style list <www-style@w3.org>
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?

... This might not be good enough in the presence of ligatures that
add decoration (fancy 'st', for instance), swashes, or even just if
the positions of individual letters within a ligature can't be
well-approximated by blind kerning.  But it seems like a step in the
right direction.

zw
Received on Wednesday, 14 August 2013 15:49:17 UTC

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