source-han-sans icon indicating copy to clipboard operation
source-han-sans copied to clipboard

in browser, display of font-weight will not same

Open forever-z-133 opened this issue 2 years ago • 2 comments

in iphone browser,display of font-weight: 600 is same as font-weight: 400. but in android browser is different. 在苹果手机浏览中,CSS 设置字重为 600 跟 400 是一样的,但在安卓浏览器中没这个问题,字重显示正常。

this problem is who's error,font? system? broswer? 这个问题是出在谁身上呢?字体、还是系统实现、还是浏览器实现?

hope for suggestions. 希望大佬能为我解惑。

forever-z-133 avatar Aug 10 '21 01:08 forever-z-133

No way to tell without more detail, but there is no 600 weight. Source Han Sans weights are 250, 300, 350, 400, 500, 700, 900. For the Noto versions they are 100, 300, 350, 400, 500, 700, 900.

punchcutter avatar Aug 18 '21 07:08 punchcutter

I am quite unsure, but according to the CSS specification(s) I would assume that 700 should be used by the browser. Perhaps a bug in the iPhone browser?

https://www.w3.org/TR/css-fonts-3/#font-style-matching (level 3, published):

If the desired weight is greater than 500, weights above the desired weight are checked in ascending order followed by weights below the desired weight in descending order until a match is found.

https://drafts.csswg.org/css-fonts/#font-style-matching (level 4, draft):

If the desired weight is greater than 500, weights greater than or equal to the desired weight are checked in ascending order followed by weights below the desired weight in descending order until a match is found.

kess avatar Aug 19 '21 01:08 kess