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] Access arbitrary points on a variable 'ital' axis via font-style #3909

Open
davelab6 opened this issue May 10, 2019 · 7 comments
Labels
css-fonts-4 Current Work

Comments

@davelab6
Copy link
Contributor

The Microsoft definition of the ital variable font axis (https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxistag_ital) says,

Valid numeric range: Values must be in the range 0 to 1.

Scale interpretation: A value of 0 can be interpreted as “Roman” (non-italic); a value of 1 can be interpreted as (fully) italic.

...

The Italic axis can be used as a variation axis within a variable font, though this is not expected to be common.

The Italic axis is distinct from the Slant axis ('slnt'). Fonts may use one or the other, depending on the nature of the design, but should rarely use both.

While "not expected to be common" and "should rarely use both" are niceties, there are now such fonts in the wild (eg https://djr.com/roslindale/ - see https://v-fonts.com/fonts/roslindale-variable-italic)

Therefore the current definition of https://www.w3.org/TR/css-fonts-4/#font-style-prop has a problem, because font-style cannot access arbitrary points on a variable 'ital' axis.

@litherum
Copy link
Contributor

@PeterCon do you have thoughts?

@svgeesus
Copy link
Contributor

So Roslindale Variable Italic has three breakpoints(.25, .5, .75) between 0 and 1 on the ital axis; at each breakpoint a set of glyphs switches between Roman and Italic forms. I presume that the order in which this happens is thought by DJR to convey how strongly this makes the overall face to be "more Italic".

The same effect would normally be achieved by stylistic sets.

@davelab6 I guess you are reporting two problems:

  1. oblique <angle>? is mutually exclusive with norml and italic
  2. there is no italicness <amount>?

It is certainly possible to change this, with normal being a synonym for italicness 0 oblique 0 and italic for italicness 1 oblique 0.

The questions is whether we should, or whether this one font is more of an experiment (perhaps preparatory to an erratum on OFF and OpenType?)

@svgeesus svgeesus added the css-fonts-4 Current Work label May 11, 2019
@litherum
Copy link
Contributor

Adding support in font-style would likely lead many CSS authors astray, and doesn’t seem worth it to support advanced functionality in just a single font (or handful of fonts). Indeed, the advanced functionality can already be achieved by using font-variation-settings.

@svgeesus
Copy link
Contributor

svgeesus commented Jul 9, 2019

@jpamental
Copy link

I think it's important to maintain consistency with how static web fonts behave, so I would suggest that when authors specify font-style: italic with a variable font, it should simply set the ital axis to 1. That way you would have the maximum compatibility with non-variable and fallback fonts. And as @litherum points out, authors already have access to set things more specifically via font-variation-settings. (thanks @svgeesus for looping me in!)

@davelab6
Copy link
Contributor Author

@litherum I expect ital continuous axes to become common, actually. I don't think it's acceptable to say "this will always be uncommon so we shouldn't support it".

The reason it is important to provide support for selecting any italic angle via font-style is that @font-face family composition allows for a set of static fonts to be used to sample the design space, and font-variation-settings isn't available then

@litherum
Copy link
Contributor

@davelab6 you can put font-variation-settings in your @font-face block. https://drafts.csswg.org/css-fonts-4/#font-rend-desc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-fonts-4 Current Work
Projects
None yet
Development

No branches or pull requests

4 participants