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

Re: font features in CSS

From: Martin J. Dürst <duerst@it.aoyama.ac.jp>
Date: Fri, 30 Oct 2009 18:29:07 +0900
Message-ID: <4AEAB1E3.50305@it.aoyama.ac.jp>
To: "Adam Twardoch (List)" <list.adam@twardoch.com>
CC: Jonathan Kew <jonathan@jfkew.plus.com>, Stephen Zilles <szilles@adobe.com>, Håkon Wium Lie <howcome@opera.com>, www-style <www-style@w3.org>, www-font <www-font@w3.org>, LTRU Working Group <ltru@ietf.org>
Hello Adam,

[cc to IETF LTRU WG]

On 2009/10/30 16:12, Adam Twardoch (List) wrote:

> All OpenType Layout features are assigned in a context of specific
> script and language system. While the assignment of script is easy (the
> engine can determine from the Unicode string which script a certain
> character belongs to, and from there it can pick the appropriate
> OpenType script branch to apply the features for), the language system
> is trickier.
> As you can see from
> http://www.microsoft.com/typography/otspec/languagetags.htm
> OpenType uses a list of language systems that do not have a 1:1
> correspondence with any of the ISO 639 standards. In OpenType 1.6 (at
> the link above), an informational mapping of OpenType language system
> tags and "best matches" in the ISO 639 standards has been provided. It
> is quite obvious that a web browser that applies OpenType Layout
> features should observe the HTML "lang" attribute and, if present, apply
> the appropriate features from the particular language system branch in a
> font (and only if absent, apply the features from the Default language
> system within a script branch). But it might be worth considering to add
> a low-level CSS access mechanism to allow users to choose a specific
> OpenType language system, because some ISO 639 codes can map to several
> OpenType language systems, e.g.
>                          (OT)    (ISO)
> Chinese Hong Kong  	ZHH  	zho
> Chinese Phonetic 	ZHP 	zho
> Chinese Simplified 	ZHS 	zho
> Chinese Traditional 	ZHT 	zho

HTML lang and XML xml:lang use BCP 47 (http://tools.ietf.org/html/bcp47, 
formerly RFC 1766/3066/4646) tags, not ISO 639 directly. BCP 47 uses 
two-letter codes (i.e. 'zh') and not three-letter codes (i.e. 'zho') 
when two-letter codes are available. Also, BCP 47 has facilities for 
indicating Region (country,...) with two-letter codes and for indicating 
script with four-letter codes. So the above list should be changed to:

                         (OT)    (BCP 47)
Chinese Hong Kong  	ZHH  	zh-HK
Chinese Phonetic 	ZHP 	**
Chinese Simplified 	ZHS 	zh-Hans
Chinese Traditional 	ZHT 	zh-Hant

** not sure what's meant by Chinese Phonetic, may be zh-Latn (Latin 
transcription) or zh-Bopo (Bopomofo)?

Regards,   Martin.

#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst@it.aoyama.ac.jp
Received on Friday, 30 October 2009 09:30:12 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:40 UTC