Subject: Re: [Ltru] font features in CSS

From: "Martin J. Dürst" <[email-masked]>
Date: Fri, 30 Oct 2009 18:29:07 +0900

Hello Adam,

[cc to IETF LTRU WG]

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

> III. LANGUAGE CLASSIFICATION
>
> 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:[email-masked]

---

From: Mark Davis ☕ <[email-masked]>
Date: Fri, 30 Oct 2009 07:49:43 -0700

Agreed.

I'm guessing he meant zh-Latn-pinyin

(http://www.iana.org/assignments/language-subtag-registry)

Mark

On Fri, Oct 30, 2009 at 02:29, "Martin J. Dürst" <[email-masked]>wrote:

> 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)
> _______________________________________________
> Ltru mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/ltru
>

---

From: Andrew Cunningham <[email-masked]>
Date: Sat, 31 Oct 2009 09:02:19 +1100

2009/10/30 "Martin J. Dürst" <[email-masked]>

>> Chinese Traditional     ZHT     zho
you are comparing apples and oranges ,as the expression goes. The ISO
language codes and BCP47 are about languages.

The table from teh OT spec is NOT a language idfentifier. It identifies what
the OT spec refers to as a language system. According to the spec:

"Language system tags identify the language systems supported in a OpenType
Layout font. What is meant by a “language system” in this context is a set
of typographic conventions for how text in a given script should be
presented. Such conventions may be associated with particular languages,
with particular genres of usage, with different publications, and other such
factors."

The language system tag could map to one language, to multiple languages,
and in unexpected ways. Grouping commonalities in orthographic
representation and typesetting traditions are the core aspect as far as I
can tell, rather than language identification.

At least thats my partial understanding.

Andrew

-- 
Andrew Cunningham
Vicnet Research and Development Coordinator
State Library of Victoria
Australia

[email-masked]
[email-masked]

---

From: Peter Constable <[email-masked]>
Date: Fri, 30 Oct 2009 22:53:34 +0000

Indeed, the OT language system tags are about typographic conventions. Now, many languages have a single conventional writing system and a single set of conventions for typography for that writing system, though conventions may different for other languages with writing systems based on the same script. A familiar example is Serbian, which has distinctive italic forms for certain letters making its typographic conventions different from, say, Russian. There may also be cases within a single language and writing system of multiple typographic conventions. For instance, Malayalam is taught today using fewer conjunct forms than were used in the past.

In principle, it may be reasonable to say that two or more languages can be described as having a common set of typographic conventions. For instance, I don’t know of any particular reason why font rendering should differ according to whether the text is English or Spanish. In practice, though, it would be very difficult to manage a system that organized the data that way: it’s far easier to allow for a default OpenType language system tag for every language, keeping in mind that OpenType fonts have a default language system and that an explicit language system only needs to be incorporated into font data and invoked when rendering if there are distinctive typographic behaviours.

Btw, I was the one that added the ISO 639 data to the table in the OT tag registry. You’ll see that there are exceptions to what I just said: some of the OT lang system tags are associated with multiple ISO 639 codes, hence multiple languages. The list of OT lang system tags were a given: someone populated the registry with many entries several years ago, adding entries before there were known needs and without first explicitly adopting and declaring a conventional set of language identities – ISO 639-3 didn’t exist then, so it wasn’t an option. Moving forward several years, many of the OT lang system tags had become a bit of a mystery, and so I felt it made sense to introduce mappings to ISO 639 in order to establish a sensible meaning for as many as possible. When faced with a lang system tag such as ATH (Athapaskan), having no documentation of what the submitter for that tag had in mind, the best alternative I had was to associate that with all Athapaskan languages.

That’s all background on the conceptual issue Andrew raised. Let me comment on what is meant by “Chinese Phonetic”, and on Martin’s comments generally, starting with the latter.

Martin suggested that the info Adam Twardoch reported (on some other list than this) should be revised. Adam was merely reporting data that was in the OpenType registry of language-system tags. In principle, changes such as Martin suggested to use IETF Language Tags with region or script subtags might make sense, but in practice that would be attempting to do something that goes beyond the intent of the OpenType tag registry and that would not be highly feasible: to equate every language system tag with a _specific_ and equivalent IETF language tag. The simple explanation is the one Andrew gave: these things are not comparable – unless we want to introduce variant subtags for typographic conventions, and I’m not sure that makes sense. My add’l explanation is that it would not be a simple task, and I don’t think it would be worth the effort. Thus, such changes will *not* be made.

As for “Chinese Phonetic”, I mentioned above that most of the tags were registered years ago without documentation. Thus, it’s not clear what was meant when ZHP was first submitted. It probably was Pinyin, though that’s not certain. Now, I could go and revise the data in the OT tag registry to make the intent explilcit, describing ZHP as being for “Chinese Pinyin”. But I’ve got to ask: are there really different typographic conventions for Pinyin than for any other Latin-based writing system for Chinese? My guess is probably not.

Peter

From: [email-masked] [mailto:[email-masked]] On Behalf Of Andrew Cunningham
Sent: Saturday, October 31, 2009 7:02 AM
To: Martin J. Dürst
Cc: Jonathan Kew; www-font; Håkon Wium Lie; www-style; Stephen Zilles; LTRU Working Group; Adam Twardoch (List)
Subject: Re: [Ltru] font features in CSS

2009/10/30 "Martin J. Dürst" <[email-masked]<mailto:[email-masked]>>

                        (OT)    (ISO)

you are comparing apples and oranges ,as the expression goes. The ISO language codes and BCP47 are about languages.

The table from teh OT spec is NOT a language idfentifier. It identifies what the OT spec refers to as a language system. According to the spec:

"Language system tags identify the language systems supported in a OpenType Layout font. What is meant by a “language system” in this context is a set of typographic conventions for how text in a given script should be presented. Such conventions may be associated with particular languages, with particular genres of usage, with different publications, and other such factors."

The language system tag could map to one language, to multiple languages, and in unexpected ways. Grouping commonalities in orthographic representation and typesetting traditions are the core aspect as far as I can tell, rather than language identification.

Andrew

[email-masked]<mailto:[email-masked]>
[email-masked]<mailto:[email-masked]>

---

From: Peter Constable <[email-masked]>
Date: Fri, 30 Oct 2009 23:02:15 +0000

Btw, Martin: it’s not clear to me what outcomes you have in mind for bringing the CSS thread into the IETF Languages list. Since this is now getting posted on two lists, it could easily become a nuisance for both. It would probably be helpful to identify specific questions that are of common interest, and keep this thread limited to that. So, can you clarify what issues you think need to be discussed across the two lists.

You made statements about HTML lang and xml:lang, and those statements seem to be correct. You suggested changes to the data in the OT tag registry; that registry is only tangentially relevant for this list, I think, though I have commented on your suggestions.

From: [email-masked] [mailto:[email-masked]] On Behalf Of Peter Constable
Sent: Saturday, October 31, 2009 7:54 AM
To: Andrew Cunningham; Martin J. Dürst
Cc: LTRU Working Group; www-font; Håkon Wium Lie; www-style; Jonathan Kew; Stephen Zilles; Adam Twardoch (List)
Subject: Re: [Ltru] font features in CSS

Peter

                        (OT)    (ISO)

Andrew

---

From: John Cowan <[email-masked]>
Date: Fri, 30 Oct 2009 20:41:09 -0400

Peter Constable scripsit:

> Indeed, the OT language system tags are about typographic
> conventions. Now, many languages have a single conventional writing
> system and a single set of conventions for typography for that
> writing system, though conventions may different for other languages
> with writing systems based on the same script. 

Is the repertoire of characters considered part of the typographic
convention of a language?  Because if so, hardly two languages will
share the same conventions.

-- 
There are three kinds of people in the world:   John Cowan
those who can count,                            [email-masked]
and those who can't.