W3C home > Mailing lists > Public > www-style@w3.org > October 2011

RE: [css3-fonts] Language-specific display and 'locl' feature (was RE: [css3-writing-modes] The original issues of font-dependent glyph orientation

From: Koji Ishii <kojiishi@gluesoft.co.jp>
Date: Sat, 1 Oct 2011 08:52:29 -0400
To: Jonathan Kew <jonathan@jfkew.plus.com>
CC: Taro Yamamoto <tyamamot@adobe.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <A592E245B36A8949BDB0A302B375FB4E0CF697758D@MAILR001.mail.lan>
Thank you Jonathan, this makes me much better understanding.

Maybe I'm asking the same question again, sorry in that case, but so if a font has 'locl' with appropriate script/language system tables, is it automatically applied when 'lang' attribute is set?

My knowledge on font system is small, but I was thinking, font features must be turned on to use, and 'lang' affects how it's applied when turned on. Now, it sounds like some features are automatically turned on while others are opt-in. 'locl' is turned on automatically, so if fonts have that table, CSS3 Fonts-compliant UA will use it.

Sorry for slow understanding but is this understanding correct?


-----Original Message-----
From: Jonathan Kew [mailto:jonathan@jfkew.plus.com] 
Sent: Saturday, October 01, 2011 9:10 PM
To: Koji Ishii
Cc: Taro Yamamoto; www-style@w3.org
Subject: Re: [css3-fonts] Language-specific display and 'locl' feature (was RE: [css3-writing-modes] The original issues of font-dependent glyph orientation

On 30 Sep 2011, at 23:10, Koji Ishii wrote:

> This is a separate issue from glyph orientation so I'm changing subject. I'm not sure if this should belong to fonts or linebox though.
> Taro is talking about yet another issue in EM DASH for East Asians. EM DASH in Latin scripts are designed to match to the center of x-height, while East Asians need it match to the center of em box. It's been a long standing issue for East Asian font designers. Some font designers chose to use Latin-positioned EM DASH for U+2014 even in East Asian fonts, which might be one of the reasons East Asian EM DASH was mapped to U+2015 in some platforms.
> His idea is to use 'locl' GSUB/GPOS feature[1] to adjust glyphs and positions. Is this supported in CSS3 Fonts?

Yes, that's exactly what [2] describes: the UA is expected to use the appropriate OpenType language system (according to the language of the document or element), which in turn determines which specific implementation of the features in the font should be applied - particularly 'locl', but other features may also vary depending on language system.

> The current spec has "Language-specific display"[2], but I can't understand which part of OpenType the 'lang' attribute should be used. Is this only applied to select lookups from features, or does it include 'locl' feature?

'locl' is just a feature like any other; all features are organized under language systems, and so using the appropriate language system will determine which specific version of the 'locl' feature gets applied.

Language is not used "to select lookups from features"; rather, (script followed by) language system is used to select a particular collection of features, each of which is implemented by one or more lookups.

E.g., in a Latin-script font, there is often a separate language system for Turkish, having a 'liga' feature that uses a lookup that does not include the 'fi' ligature. So language/locale-specific behavior may be implemented in any feature, not only 'locl' - but if there are particular glyph substitutions that relate to a certain locale, and are not part of some other feature such as 'liga', then 'locl' would generally be the appropriate place to implement them.

> By "select lookup" I mean picking up appropriate lookup table from TrueType/OpenType format as in page 11 of [3]. I guess it's talking about this, am I correct?

The document [3] is very old; better to refer to the current documentation on the Microsoft site[4], for example.


> [1] http://www.microsoft.com/typography/otspec/features_ko.htm#locl
> [2] http://dev.w3.org/csswg/css3-fonts/#language-specific-support
> [3] 
> http://hackipedia.org/File%20formats/TrueType/v2.00%20OpenType/ttoch02
> .doc.pdf

[4] http://www.microsoft.com/typography/otspec/chapter2.htm

> Regards,
> Koji
> -----Original Message-----
> From: Taro Yamamoto [mailto:tyamamot@adobe.com]
> Sent: Thursday, September 29, 2011 5:00 PM
> To: Koji Ishii; www-style@w3.org
> Subject: RE: [css3-writing-modes] The original issues of 
> font-dependent glyph orientation
> Ishii-san,
>> I talked with Taro Yamamoto today and we found an interesting case 
>> for 2nd issue.
> After the conversation with you yesterday, I considered this issue some more. My current idea is that the issue, viz. of a group of dash and ellipsis characters that need to show different glyph shapes (the Japanese EM-box centered and the roman adjusted for lowercase), depending on the language context, can be solved by applying the 'locl' or some appropriate GSUB feature to the glyphs mapped from the U+2014 (and other similar related glyphs, such as 2-EM dashes and ellipses, etc). Eric might have his own comments, though.
> Regards,
> --Taro
Received on Saturday, 1 October 2011 12:52:24 UTC

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