Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Restoring optional ligatures by resetting letter-spacing #11202

Merged
merged 4 commits into from
Jul 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions res/css/_common.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ html {
body {
font: var(--cpd-font-body-md-regular);
letter-spacing: var(--cpd-font-letter-spacing-body-md);
/**
* We want to apply Inter Dynamic metrics (https://rsms.me/inter/dynmetrics/)
* We need to tweak the `letter-spacing` property and doing so, disables by
* default the optional ligatures
* `font-feature-settings` allows us to override this behaviour and have the
* correct ligatures and the proper dynamic metric spacing.
*/
font-feature-settings: "kern" 1, "liga" 1, "calt" 1;

background-color: $background;
color: $primary-content;
Expand Down