Re: [csswg-drafts] [css-fonts-4] src: local() font unique name matching ambiguous & restricts matched locale (#3177)

FWIW, Chrome on macOS *doesn't* appear to match on PSnames in `font-family`, at least for me....
```
data:text/html,<div style="font-size:30px; font-family: Times-BoldItalic, sans-serif;">hello world
```
gives me sans-serif, not Times.

Currently I'm only seeing Times-BoldItalic (incorrectly) used by Safari with that example.

Regarding family names, from the code at https://searchfox.org/mozilla-central/rev/8acfbe4ba09b46b91c862dc2fbc064d4fc1bac9a/gfx/thebes/gfxFontUtils.cpp#1698 it looks like Firefox checks for both the Typographic Family (ID=16) and legacy Family (ID=1) names; if they're different it will include both in its table of available font families to match.

(With the aim of more consistent behavior across platforms, Firefox doesn't rely on OS APIs to look up fonts; instead, it queries the OS for the available fonts but builds an internal table of families and faces, so that it can apply the font matching algorithm itself rather than depending on what an opaque API may return for a given query.)

-- 
GitHub Notification of comment by jfkthame
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3177#issuecomment-1792897736 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 3 November 2023 18:01:18 UTC