font-variant-numeric: tabular-nums; is not working for the -apple-system font
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: rik, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15
Steps to reproduce:
I set font-variant-numeric: tabular-nums;
but it doesn't seem to work.
Demo:
https://codepen.io/rikschennink/pen/EJYVoX?editors=1100
Actual results:
Nothing
Expected results:
as far as I can understand from the docs, equal spacing for numeric characters, this does happen on both Safari and Chrome
Hello reporter,
Thank you for taking the time to add this report.
Following the examples provided here ( https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric ) if I change the font-variant-numeric on your example from tabular-nums to normal I do not observe any difference. It does, however, work if I change it to oldstyle-nums.
This is valid for all the latest Firefox versions. I am going to add this to Core: Layout: Text and Fonts for an advised input. If this is not the proper component, feel free to change it to a more appropriate one.
Comment 2•6 years ago
|
||
This depends on whether the specific font being used supports the tabular-numerals feature or not. For example, if I try Fira Sans, the font-variant-numeric: tabular-nums
setting works as expected.
In the case of the demo from comment 0, we use the -apple-system font (.SFNS Text). This font has a kerx
table, which prompts us to route it through Core Text shaping rather than harfbuzz, because until recently harfbuzz didn't support the AAT tables. But we don't map features like tabular-nums to the corresponding AAT feature selectors, and so it doesn't work there.
I believe this will be fixed when we drop the Core Text backend and use harfbuzz for AAT font shaping.
Updated•2 years ago
|
Description
•