Re: [csswg-drafts] [css-fonts-4] Behavior for variable fonts with 'ital' axis ambiguous / underspec'ed (#3125)

What if `font-style` could accept multiple values, mirroring that the font file is capable of covering several "styles"?

```
@font-face {
  /* The font is expected to provide an 'ital' axis (it may or may not be a visually slanted italic or not, up to the font vendor) */
  font-style: normal italic [ital value];

  /* The font is expected to provide a 'slnt' axis (it is expected to be visually slanted) */
  font-style: normal oblique [slnt angle];

  /* The font has both 'ital' and 'slnt' */
  font-style: normal italic [ital value] oblique [slnt angle];
}

* {
  font-style: normal|italic [ital value] oblique [slnt angle];

  /* equals font-variation-settings: 'ital' 0, 'slnt' 0 */
  font-style: normal; 
  
  /* equals font-variation-settings: 'ital' 1 [, 'slnt' 0] */
  font-style: italic; 

  /* equals font-variation-settings: 'ital' 0.5 [, 'slnt' 0] */
  font-style: italic 0.5; 

  /* equals font-variation-settings: 'ital' 0 , 'slnt' 10 */
  font-style: normal oblique -10; 

  /* equals font-variation-settings: 'ital' 1 , 'slnt' 10 */
  font-style: italic oblique -10; 
}
```

(I don't think a case should be made for "normal 0.5" manipulating the 'ital' axis akin to "italic 0.5", although it could be specced like that — it is more natural to define an "amount of italicness" via the "italic" attribute, imo.)

A variable font covering uprights, cursive forms triggered by "ital" and slanted italics covered by "slnt" could thus be used. It would even allow for gradual triggering of cursive forms using the specced ital range 0 to 1. The obvious inconsistency the two specs make regarding slant/oblique angle direction is already in existence, unfortunately.

-- 
GitHub Notification of comment by kontur
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3125#issuecomment-2014677886 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 22 March 2024 09:21:15 UTC