Fix historical ligatures for texts (#4603)

This commit is contained in:
Leedehai 2024-08-05 06:00:33 -04:00 committed by GitHub
parent 6db95c633f
commit 33f13d7881
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View File

@ -1179,7 +1179,7 @@ pub(crate) fn features(styles: StyleChain) -> Vec<Feature> {
}
if TextElem::historical_ligatures_in(styles) {
feat(b"hilg", 1);
feat(b"hlig", 1);
}
match TextElem::number_type_in(styles) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -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]