Re: [csswg-drafts] [css-fonts] Clarify how the computed font-size is determined for size keyword (#3906)

In Gecko it's a bit more complex than that and it also depends on the language group.

The default values for those user settings are [here](https://searchfox.org/mozilla-central/rev/b9da45f63cb567244933c77b2c7e827a057d3f9b/modules/libpref/init/all.js#3399), but you can really configure it as you want.

So in Gecko this for example will still render the `mono` text with 16px font-size for `zh-HK` by default: `data:text/html, <div style="font-family: serif">Serif <div lang="zh-HK" style="font-size: monospace">mono</div></div>`.

Other than that the logic is similar to WebKit. If there's a single generic font-family, then we get the base font-size for that generic, otherwise we use the `variable` font-size (which is 16px by default). Then with that base size we apply a similar mapping to WebKit:

https://searchfox.org/mozilla-central/rev/b9da45f63cb567244933c77b2c7e827a057d3f9b/servo/components/style/values/specified/font.rs#728

/cc @jfkthame

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

Received on Friday, 10 May 2019 10:35:53 UTC