mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-11-30 01:00:27 +03:00
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>