W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2017

[csswg-drafts] [css-fonts-4] @font-face unicode-range and first available font

From: Sergey Malkin via GitHub <sysbot+gh@w3.org>
Date: Tue, 29 Aug 2017 19:12:18 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-253772116-1504033927-sysbot+gh@w3.org>
SergeyMalkin has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts-4] @font-face unicode-range and first available font ==
CSS-Fonts-4 defines first available font as "the first available font that would match any character given font families in the font-family list (or a user agent’s default font if none are available)". As I interpret this, following css and html should use Arial metrics as a source for ex unit:

@font-face {
    font-family: Test;
    src: local('Arial');
    unicode-range: U+4??;
<div style="font-family:Test; line-height:10ex;">Should be as high as 10ex of Arial</div>

Edge is doing what I expect. But Chrome will no use Arial unless there is no unicode-range descriptor or (from my experiments) unicode-range has any value that covers U+0020 space character.

This has effect on performance of @font-face font downloads. Without additional restrictions, we will load extra fonts that would not normally be used because of unicode-range filtering. 

Do I interpret the spec correctly?

Repro page: [https://jsfiddle.net/fdsmzn6j/11/](https://jsfiddle.net/fdsmzn6j/11/)
Definition of first available font: [https://drafts.csswg.org/css-fonts-4/#first-available-font](https://drafts.csswg.org/css-fonts-4/#first-available-font)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1765 using your GitHub account
Received on Tuesday, 29 August 2017 19:12:15 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:17 UTC