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

[css3-text] letter spacing examples

From: John Daggett <jdaggett@mozilla.com>
Date: Wed, 29 Aug 2012 20:51:29 -0700 (PDT)
To: www-style list <www-style@w3.org>
Message-ID: <1974956822.4602960.1346298689879.JavaMail.root@mozilla.com>
>From the San Diego F2F discussion of letter-spacing in CSS3 Text [1]:

> jdaggett: http://people.mozilla.org/~jdaggett/tests/letter-spacing-tests.html
> jdaggett: I did some tests.
> jdaggett: Checking interopreability.
> jdaggett: letter spacing should control spacing on either side of char,
>          but should not affect last letter (if right aligned line)
> jdaggett: [shows image]
> jdaggett: But implementations add spacing after last letter.
> jdaggett: [shows another image]
> jdaggett: This image shows fully justified.
> <fantasai> http://dev.w3.org/csswg/css3-text/#letter-spacing
> <fantasai> "Letter-spacing must not be applied at the beginning or
>            at the end of a line."
> fantasai: The spec already says what UAs must do.
> jdaggett: It doesn't say *how* spacing is applied.
> jdaggett: at the end of the line you should not get space.
> fantasai: Yes, that is a bug according to the current spec.
> jdaggett: But the spec doesn't say exactly that
> dbaron: the spec is precise, but you are describing a different model,
>        equally precise, but different at element boundaries.
> jdaggett: I think you actually have to get into how it works, e.g., in rtl.
> fantasai/dbaron: What impls do is already bug, according to current spec.
> jdaggett: I don't see that text.
> jdaggett: What fantasai quoted is not precise enough.
> fantasai: Give me an example that is not covered by the spec, and we'll
>          improve the spec.
> jdaggett: and between ltr trl boundaries?
> fantasai: It is still "between chars" as the spec says.
> SteveZ: Half on each side, and you can't tell the difference.
> fantasai: You can do it as trailing edge internally, but you still have
>          to handle the boundaries correctly.
> jdaggett: I'll have to look more.

Just a quick follow-up on this discussion.  I did some more testing and came
up with an example page to illustrate what current implementations do with letter-spacing and what the CSS3 Text definition says they should do.  In the
example page below "correct rendering" refers to the CSS3 Text way of rendering
letter spacing:

  http://people.mozilla.org/~jdaggett/tests/letterspacing-css3-text.html

Regards,

John Daggett

[1] http://lists.w3.org/Archives/Public/www-style/2012Aug/0897.html
Received on Thursday, 30 August 2012 03:51:57 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT