Re: [css-text] letter-spacing tests

Hi Richard,

On 10/10/14 8:08 AM, Richard Ishida wrote:
> I threw together some quick i18n tests for letter-spacing. You can see 
> pictures of the results by following the links below.
>
> It appears that browsers generally take glyphs as the basis from which 
> to apply the letter-spacing, rather than starting with characters, and 
> the end result is therefore usually incorrect for non-latin cases, and 
> highly font-dependent.
>
>
> http://www.w3.org/International/2014/letter-spacing/mac-chrome.png
> http://www.w3.org/International/2014/letter-spacing/mac-firefox.png
> http://www.w3.org/International/2014/letter-spacing/mac-safari.png
> http://www.w3.org/International/2014/letter-spacing/windows-ie.png
>
>
> Perhaps the spec should make it clearer that the basic starting point 
> for application of letter-spacing should be the characters that make 
> up the relevant typographic text units rather than the glyphs in the 
> font?
>
> [...]
>
>
> Arabic
> Assertion: The letter-space property produces NO spaces between 
> characters for Arabic text, and preserves the lam-alif ligature.
>
> All browsers added space between characters that should be joining. On 
> the Mac the Scheherazade font failed to keep the lam-alif and lam-meem 
> combinations together, separating the glyph parts.

Few comments on your examples

1) Unlike lam-alif, the lam-meem ligature seem to be font-dependant. 
This may explain in some browsers why the letter-spacing property breaks 
the lam-meem ligature and not lam-alif. With the Tahoma font, which is 
often used in Arabic pages, the lam-alif is not broken, whereas the 
lam-meem is.

2) Not sure that the 'Traditional Arabic' font (the third line) is in 
effect in your example. 'Traditional Arabic' has almost the same glyphs 
than 'Al Bayan'. And it gives the same result as Scheherazade font with 
Firefox on Mac, i.e. it separate lam-alif and lam-meem.

3) The normal (100%) size for Arabic font varies somewhat from one font 
to another. This may explain why the  browsers generally take glyphs as 
the basis from which to apply the letter-spacing.

For your convenience, here are the same examples with other fonts.
http://196.200.140.8/Tests/TestLetterSpacing/

Note that with the Rabat font (calligraphic), the lam-meem ligature is 
broken and a new ligature appears just after (teh-jeem) which is not broken.

Regards,

Najib

>
> Note also that the extra spacing at the end of the span appears to the 
> right, not to the left, of this RTL sequence, for all browsers.
>
> [...]
>
> (Btw, not shown in the pictures, I also did a test for zero-width 
> control characters (which should be ignored for spacing) and all 
> browsers failed.)
>
> ri

Received on Friday, 10 October 2014 17:44:35 UTC