CoreText: language to OpenType tag mapping

I'm working on a Burmese font which has support for Arakanese (Rakhine). Arakanese has ISO639-3 language tag
rki
but OpenType language tag ARK
. To simplify the problem I created a test font based on Fallback Plus, with the following rules:languagesystem mym2 dflt; languagesystem mym2 ARK ; feature locl { script mym2; language ARK ; sub uni1000 by glyph01; } locl;i.e. when rendering Arakanese text, change the "Myanmar ka" glyph from uni1000 to glyph01. I then created a test HTML file:
<p lang="rki-Mymr">က</p> <p lang="ark-Mymr">က</p>
Notice that the top row has the correct HTML lang attribute - i.e. the ISO language tag for the Rakhine language. The second row is bogus - it asks for Arikapú, an indigenous Brazilian language, but written in the Burmese script.
In Google Chrome:
(the top row is substituted for the "Arakanese" glyph, the second one is not).
In Safari:
The opposite happens. This suggests to me that CoreText (and I've confirmed this with hb-shape) is receiving the "rki" ISO language tag but is not mapping it correctly to the "ARK" OpenType tag and then applying those rules; but it is (erroneously) mapping the "ark" language tag straight through to the "ARK" OpenType tag. (See the language system tag list in the OpenType spec for the correct mapping.)
I haven't checked whether this is also the case for other complex shapers. gzip'd font attached.
Comments
-
(I've now convinced myself that this is a bug, and have also filed it as bug FB9809046 in Feedback Assistant.)2
Categories
- All Categories
- 46 Introductions
- 3.8K Typeface Design
- 478 Type Design Critiques
- 556 Type Design Software
- 1.1K Type Design Technique & Theory
- 641 Type Business
- 832 Font Technology
- 29 Punchcutting
- 510 Typography
- 120 Type Education
- 315 Type History
- 75 Type Resources
- 109 Lettering and Calligraphy
- 30 Lettering Critiques
- 79 Lettering Technique & Theory
- 533 Announcements
- 86 Events
- 110 Job Postings
- 167 Type Releases
- 169 Miscellaneous News
- 274 About TypeDrawers
- 53 TypeDrawers Announcements
- 119 Suggestions and Bug Reports