Files
AFFiNE/packages
CommaBotandDarkSky 4c3593d926 fix(component): use the slant axis for Inter italic (#15913)
Inter ships as one variable font whose italics come from its `slnt` axis
(-10..0), but `fonts.css` only declared a face with the default
`font-style: normal`. For italic text Chromium up to at least 145 (and
so the current Electron 39 desktop builds) applied the slant axis and
then synthesized an oblique on top of it, which is why italics lean far
more than the font intends.

This declares an explicit italic face from the same file with
`font-variation-settings: 'slnt' -10`.

Rendered `font-style: italic` text, compared with upright text using
`font-variation-settings: 'slnt' -10`:

| | before | after |
|---|---|---|
| Chromium 145 / Electron 39 | slanted twice | matches slnt -10 |
| Chromium 150 (Electron 43) / Chrome 157 | matches slnt -10 | matches
slnt -10 |
| Firefox 160 | matches slnt -10 | matches slnt -10 |
| WebKit (macOS) | upright | upright |

Declaring the face as `font-style: oblique 0deg 10deg` instead fixes
WebKit but makes every Chromium version slant twice, so it is not used.
Without `font-variation-settings` on the italic face Firefox renders it
upright.

Adds a test that the italic face uses the font's own minimum `slnt`
value.

fix #14451

Co-authored-by: DarkSky <darksky2048@gmail.com>
2026-11-23 22:56:03 +08:00
..
2026-11-23 17:19:29 +08:00