diff --git a/crates/typst/src/text/mod.rs b/crates/typst/src/text/mod.rs index 76ea26c10..f2e525cfd 100644 --- a/crates/typst/src/text/mod.rs +++ b/crates/typst/src/text/mod.rs @@ -1179,7 +1179,7 @@ pub(crate) fn features(styles: StyleChain) -> Vec { } if TextElem::historical_ligatures_in(styles) { - feat(b"hilg", 1); + feat(b"hlig", 1); } match TextElem::number_type_in(styles) { diff --git a/tests/ref/text-ligatures.png b/tests/ref/text-ligatures.png index 6f0e286c6..88720c893 100644 Binary files a/tests/ref/text-ligatures.png and b/tests/ref/text-ligatures.png differ diff --git a/tests/suite/layout/inline/text.typ b/tests/suite/layout/inline/text.typ index e2bc84efc..ba0e625ef 100644 --- a/tests/suite/layout/inline/text.typ +++ b/tests/suite/layout/inline/text.typ @@ -12,8 +12,12 @@ a vs #text(alternates: true)[a] \ ß vs #text(stylistic-set: 5)[ß] --- text-ligatures --- -// Test ligatures. -fi vs. #text(ligatures: false)[No fi] +// Test text turning off (standard) ligatures of the font. +#text(ligatures: false)[fi Qu] vs fi Qu \ +// Test text turning on historical ligatures of the font. +abstract vs #text(historical-ligatures: true)[abstract] \ +// Test text turning on discretionary ligatures of the font. +waltz vs #text(discretionary-ligatures: true)[waltz] --- text-number-type --- // Test number type. @@ -34,7 +38,7 @@ fi vs. #text(ligatures: false)[No fi] 1/2 vs. #text(fractions: true)[1/2] --- text-features --- -// Test raw features. +// Test raw features array or dictionary. #text(features: ("smcp",))[Smcp] \ fi vs. #text(features: (liga: 0))[No fi]