Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-fonts] value of `font-style`: `normal` vs. `oblique 0deg;` #2505

jfkthame opened this issue Apr 5, 2018 · 2 comments


None yet
5 participants
Copy link

commented Apr 5, 2018

At, the draft spec says that normal

represents an oblique value of "0".

However, it is not clear to me from the spec exactly what this means. Given a non-variable font, with the typical Regular and Italic faces, which face will font-style: oblique 0deg; select?

(According to my testing, Chrome and MSEdge disagree on the answer to this.)

And with regard to animation, we find

If both "from" and "to" values are "oblique", then yes, as an <angle>. Otherwise, no.

Does normal count as oblique 0deg for this purpose, such that font-style could be animated as an <angle> from normal to oblique 15deg or not?

@svgeesus svgeesus added the css-fonts-4 label Apr 6, 2018


This comment has been minimized.

Copy link

commented Apr 11, 2018

The Working Group just discussed (distinction -- or not -- between 'oblique 0deg' and 'normal' for font-style), and agreed to the following resolutions:

  • RESOLVED: leave font-style computed values as-is; change font-style animation behavior so that 'normal' can animate with 'oblique <num>'
The full IRC log of that discussion <dael> Topic: (distinction -- or not -- between 'oblique 0deg' and 'normal' for font-style)
<ChrisL> apropriate means weight, style, stretch
<dael> github:
<dael> dbaron: The spec for font styles says normal represents an oblique value of 0.
<dael> dbaron: Jonathan writes it's not clear to him what this means [reads from issue]. HIs test shows chrome and edge disagrees.
<dael> jpamental: There's two variations
<dael> ChrisL: It's the slant one. His point is valid is if it's the same as 0 you have the endpoints of the animation. I think oblique:0 should match.
<dael> myles: ChrisL is right. We impl that it's just a number becasue we treat italic and oblique the same. So normal = oblique 0deg.
<dael> fantasai: Computed value?
<dael> myles: Prob the keyword? DOn't know.
<dael> fantasai: Matters for animations.
<dael> myles: Sure then we make computed values always the oblique. Question is what is the coputed value of the font style property. If computed value is normal for ital you can't animate.
<dael> TabAtkins: You can animate from oblique 0.
<dael> myles: Computed value of normal should be oblique 0. Computed value of oblique with nothing...
<dael> fantasai: I don't htink it' sbackwards compat.
<dael> fantasai: Computed value shoulds tay the same.
<dael> TabAtkins: We can also make the animation value handle that.
<dael> myles: Is there precedent for that?
<dael> TabAtkins: Sure we can make it work. We have special behavior for transforms from none
<dael> myles: This is the same.
<dael> myles: SO we'll punt
<dael> TabAtkins: Change animation so that normal can animate with oblique as if normal is 0.
<dael> fremy: And if you put 0 in your style sheet computed value is 0.
<dael> TabAtkins: Some UA map italic to oblique and if they do so they should be able to animate between italic and oblique.
<dael> fantasai: A variable font with both italic and oblique axis and I spec font-style italic
<dael> myles: We keep a flaot for the oblique angle and we keep a bit to know if that came from oblique or italic axis.
<dael> fantasai: isn't it 2d pspace?
<dael> myles: It's just not a variable thing.
<dael> fantasai: Can variable fonts have variable italic?
<dael> ChrisL: No.
<dael> jpamental: Intent was italic to be on or off.
<dael> florian: If you want a font to have stanges between you have a custo axis?
<dael> ChrisL: Yes.
<dael> fantasai: So you have parallel tracks
<dael> ChrisL: You can have a custom axis and then it doesn't inteset with CSS properties.
<dael> myles: mechanically it's possible to have fonts that do that but many experts have not seen a variable angle of italic.
<dael> jpamental: Italic is either ital or not, it's not a degree of ital.
<dael> fantasai: All writing systems?
<dael> ChrisL: Most don't have ital.
<dael> dbaron: Trying to understand in font matching algo of 5.2 bullet 4 sub bullet 2.
<dbaron> If the value of font-style is oblique and the requested angle is greater than or equal to 0deg and less than 20deg,
<dael> dbaron: It's about font style. The 3rd unnumbered sub clause. Sentence starts with ^
<dael> dbaron: This includes an oblique font 0deg. THis is sep from normal clause and it's not clear to me if sub point 2 includes normal fonts.
<dael> dbaron: It says if it's oblique and the angle is >=0 and <20 if you have an exact match use that but if yo have smaller look down to 0. It doesn't say if it include 0 and, if it does, if it's normal 0.
<dael> myles: Do we need a resolutoin to make it more clear?
<dael> dbaron: I think it's fine if you just clear the spec up.
<dael> astearns: We've got the proposed resolution that TabAtkins put: leave font-style computed values as-is; change font-style animation behavior so that 'normal' can animate with 'oblique <num>'; if the UA treats 'italic' as an oblique value, also allow it to animate with 'oblique <num>'.
<dael> astearns: Objections or issues with it?
<dael> ChrisL: sgtm
<dael> myles: cool.
<dael> fantasai: We have UA defined behavior in the resolution and I don't like it.
<dael> astearns: It's reiterating behavior we have
<dael> fantasai: Changes to if you can anmate it.
<dael> fantasai: I'm not sure what's going on with the ones that can annimate and not.
<dael> myles: I think it's if you are a browser that treats oblique and ital as the same you should be able to animate between. If not you can't.
<dael> florian: I'm not sure about that. The author chooses ital, why animate?
<dael> TabAtkins: Some browsers don't distinguish.
<dael> fantasai: But then they can't tell which they should download. Seems like a problem. If I said ital I should get ital first.
<dael> many: not how it works.
<dael> fantasai: As an author I'll never get italic?
<dael> florian: In some browsers, yes.
<dael> myles: There's one signal.
<dael> myles: You'll get something consistant if they're both there.
<dael> fantasai: I load a font with an ital variant and an oblique varient and I can only get one. Why is this good?
<dael> myles: It's how it's always been.
<dael> fremy: This was in css 2.
<dael> astearns: We can choose not to extend.
<dael> ChrisL: Do browsers do this? Treat them as identical?
<dael> myles: The bit doesn't effect font selection, it's only to have the right axis.
<dael> astearns: I suggest we take the proposal and strike the UA part
<dael> Prop: leave font-style computed values as-is; change font-style animation behavior so that 'normal' can animate with 'oblique <num>'
<dael> astearns: Objections?
<fantasai> “A value of 'italic' selects a font that is labeled 'italic', or, ****if that is not available****, one labeled 'oblique'.”
<dael> RESOLVED: leave font-style computed values as-is; change font-style animation behavior so that 'normal' can animate with 'oblique <num>'

This comment has been minimized.

Copy link

commented Apr 11, 2018

Sorry when I said CSS 2, I mean CSS-FONTS-3:

User agents are permitted to distinguish between italic and oblique faces within platform font families but this is not required, so all italic or oblique faces may be treated as italic faces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.