Re: [csswg-drafts] Font-family name matching requires full Unicode case comparison (#3675)

The CSS Working Group just discussed `font-matching and unicode`, and agreed to the following:

* `RESOLVED: Use ascii-case folding`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio_> topic: font-matching and unicode<br>
&lt;emilio_> github: https://github.com/w3c/csswg-drafts/issues/3675<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/3675<br>
&lt;emilio_> myles__: Spec says that in order to match font-family names full unicode case folding needs to be performed<br>
&lt;emilio_> myles__: so you need to run the names to complicated ICU routines<br>
&lt;emilio_> myles__: We just fold ascii chars in WebKit, for performance reasons<br>
&lt;emilio_> myles__: we never perform unicode case folding in WebKit<br>
&lt;emilio_> fantasai: When you search on a page?<br>
&lt;emilio_> myles__: that particular API is a different one, but we do use unicode<br>
&lt;emilio_> myles__: It should use compatibility decomposition and caseless matching<br>
&lt;emilio_> s/myles__/fantasai<br>
&lt;emilio_> myles__: ascii case folding is fast<br>
&lt;emilio_> myles__: I haven't done any measurement but if we used the unicode case comparison it'd likely be a perf regression because font lookups are hot<br>
&lt;emilio_> myles__: wanted to relax this restriction<br>
&lt;emilio_> heycam: why not require the ascii-case folding?<br>
&lt;emilio_> myles__: that's fine too<br>
&lt;emilio_> heycam: I don't think there's many situations when you have non-ascii names?<br>
&lt;emilio_> myles__: fonts have many names in many languages, in addition to an ascii name, generally<br>
&lt;emilio_> florian[m]: isn't common to have a case-mismatched cyrillic name? Is it not a compat issue?<br>
&lt;emilio_> myles__: it's not<br>
&lt;emilio_> myles__: proposed resolution is that font-family lookups should use ascii-case-insensitive matching<br>
&lt;emilio_> dbaron: what do other implementations do?<br>
&lt;emilio_> myles__: probably matches chrome<br>
&lt;emilio_> eae: it does<br>
&lt;fantasai> fantasai: I'd like to check with jfkthame<br>
&lt;fantasai> emilio_: I can check what Firefox does, hang on<br>
&lt;emilio_> emilio_: We do whatever nsCaseInsensitiveStringComparator does<br>
&lt;emilio_> dbaron: that's ascii<br>
&lt;emilio_> RESOLVED: Use ascii-case folding<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3675#issuecomment-468091331 using your GitHub account

Received on Thursday, 28 February 2019 00:51:12 UTC