Skip to content

[css-fonts-5] Add glyph scaling override descriptor to @font-face #6075

@fantasai

Description

@fantasai

In #5983 (comment) @jfkthame wrote:

I think there should be a separate font-size-override that can apply a scale factor to the used font size; I suspect this would often be the better tool to use.

Using a scaling factor to make adjustments for font fallback would avoid some of the more problematic aspects of advance-override (breaking cursive/complex scripts, breaking typographic rhythm by adding uneven spacing, breaking alignment at the edges of paragraphs).

It also provides a long-needed feature--optically matching fonts when mixing font faces--by allowing per-font scaling adjustments at the author's discretion. font-size-adjust does this for certain bicameral scripts by using the ex-height metric, but that doesn't work more generally across writing systems as noted in #4540 .

The proposal would be to add a descriptor taking a percentage and effectively functions the same as font-size-adjust for a given scale factor. Details to consider [suggestions in brackets to match font-size-adjust]:

  • Effect on em units? [No effect on em.]
  • Effect on ch/ic/ex units? [These are supposed to match glyph metrics, so are affected.]
  • Effect on baseline table? [Scales the table.]
  • Effect on ascent/descent metrics? [Should scale them also.]
  • Effect on ascent-override/descent-override/etc.? [Scales with the scale factor.]
  • Allow separate vertical/horizontal scale factors? [No idea. We can start with one and see if independent axes are needed.]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions