W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2018

Re: [csswg-drafts] [css-fonts] Propose adding lang as a font-face descriptor

From: Mike Bremford via GitHub <sysbot+gh@w3.org>
Date: Fri, 02 Feb 2018 15:44:40 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-362621895-1517586280-sysbot+gh@w3.org>
I also think this is a good idea. Particularly if we define the  "lang" property as a list of languages, and define the highest priority @font-face match as (assuming all other @font-face matching criteria are equal) the one with the longest common prefix. For example:
```
@font-face {
  font-family: thefont;
  src: url(thefont-zh-simp.otf);
  lang: zh
}
@font-face {
  font-family: thefont;
  src: url(thefont-zh-trad.otf);
  lang: zh-HK zh-TW
}
```
* Language of "zh-TW" will match both rules, but the second has the higher priority.
* Language of "zh-SG" will match the first rule due to the common prefix "zh"


-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1744#issuecomment-362621895 using your GitHub account
Received on Friday, 2 February 2018 15:44:44 UTC

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