[csswg-drafts] [css-fonts-4] Style Matching & grammar for font-style property and font-style property descriptor

drott has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-fonts-4] Style Matching & grammar for font-style property and font-style property descriptor ==
In the ["Matching Font Styles algorithm"](https://drafts.csswg.org/css-fonts-4/#font-style-matching), for style matching, the algorithm is defined to perform this first step:

> If the matching set includes faces with italic values containing the mapped value of italic, faces, then faces with italic values which do not include the desired italic mapped value are removed from the matching set.

What does 
> mapped value of italic

mean in this case?

Then the algorithm talks about searching along the italic axis:

> Otherwise, italic values above the desired italic value are checked in ascending order followed by italic values below the desired italic value, until 0 is hit. Only positive values of italic values are checked in this stage.

However, as far as I read it, the font-style property, as well as the font-style property descriptor do not allow specifying an italic axis range, or an arbitrary italic value between 0 and 1 on the italic axis.

The grammar for the font-style property descriptor is

> `normal | italic | oblique [ <angle> | <angle> <angle> ] ?`

And I interpret the grammar right, something like
`font-style: italic 0.5 0.7;`
would be invalid.

In order to define italic ranges, shouldn't this be:

`normal | italic [ <italic_amount> | <italic_amount> <italic_amount> ]? | oblique [ <angle> | <angle> <angle> ]?`

Similarly, currently the font-style property's grammar is:

> `normal | italic | oblique <angle>?`

But shouldn't this be:

`normal | italic <italic_amount>? | oblique <angle>?`

to be consistent with the stretch matching part of the algorithm?

CC @litherum, @PeterCon






Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1531 using your GitHub account

Received on Thursday, 15 June 2017 13:40:52 UTC