w3c / w3c/csswg-drafts

[css-fonts] Access arbitrary points on a variable 'ital' axis via `font-style`

Open
#3,909 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-fonts-4
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CSS Fonts Level 4 definition of the font-style property and compare its handling of the ital axis with the linked OpenType definition. Review the Roslindale example to understand the use case; done means the specification explains how font-style can access arbitrary ital-axis values.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.