W3C home > Mailing lists > Public > www-style@w3.org > January 2016

Re: [css-text] Issue 18: character-based alignment in table columns

From: Stephen Zilles <szilles@adobe.com>
Date: Wed, 27 Jan 2016 19:52:17 +0000
To: Dave Cramer <dauwhe@gmail.com>, Alan Stearns <stearns@adobe.com>
CC: Tab Atkins Jr. <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <tf5k2j1uaqnd62fmsc40plf0.1453923946957@email.android.com>

Sent from Samsung tablet

-------- Original message --------
From: Dave Cramer <dauwhe@gmail.com>
Date: 01/27/2016 10:45 (GMT-08:00)
To: Alan Stearns <stearns@adobe.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>,www-style@w3.org
Subject: Re: [css-text] Issue 18: character-based alignment in table columns

On Tue, Jan 26, 2016 at 2:55 PM, Alan Stearns <stearns@adobe.com<mailto:stearns@adobe.com>> wrote:
On 1/27/16, 6:36 AM, "Tab Atkins Jr." <jackalmage@gmail.com<mailto:jackalmage@gmail.com>> wrote:

>This sounds like those tools just not considering the case of the
>texts being in different fonts or faces.  I don't think there's a good
>reason to copy that bug.  You clearly want the texts *aligned*, and
>aligning centers seems most likely to get you that result.

I agree. It’s likely this is an edge case that just never got considered or was never considered worth the time to address. In InDesign or TeX, when the problem crops up you can tell the user “If you want those things aligned, use the same font and size.” On the web that’s often not an option, so we can handle this edge case better.

I'm all in favor of making CSS better than InDesign. I'm not so sure about the right thing to do. Let's look at the most common case of a bold row in a decimal-aligned table. In Adobe Caslon Pro, the em-squares of both roman and bold numerals are 500 units wide (1000 units/em). The em-square of the roman period is 254 units wide, but 280 units wide for the bold period.

So where does that extra space go? In InDesign, numerals to the right of the alignment character are pushed right a bit. This leaves numerals to the left unaffected.

If we center the alignment character, then numerals to the left shift a tiny bit right, and numerals to the right shift a tiny bit left.

I think the InDesign behavior might be more desirable, given that numbers to the left are literally more important (and there are usually more of them).

SZ: I agree with Dave. As he notes, a major use case for the alignment character is aligning columns of figures. We should not screwup this case for an abstract engineering ideal. Is there a use case that requires using the center of the alignment character?

Steve Z
Note I'm assuming that we're not messing with the text layout itself, i.e. not kerning around the alignment character to achieve some particular goal. And the lengths we're talking about are rather small... .026em is not very much. Of course if you're trying to align across significantly different font sizes (etc.), you're gonna have a bad time.


Received on Wednesday, 27 January 2016 19:52:50 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:56 UTC