Use stylistic-set: 1 in favor of ss01 in docs and tests (#6766)

This commit is contained in:
Y.D.X. 2025-08-15 19:30:37 +08:00 committed by GitHub
parent 1d9a125a52
commit 5ef94692ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -91,13 +91,13 @@ pub fn cal(
/// in Typst, however only a few math fonts currently support this.
///
/// The other way is using [font features]($text.features). For example, the
/// roundhand style might be available in a font through the `ss01` feature.
/// To use it in Typst, you could then define your own version of `scr` like
/// this:
/// roundhand style might be available in a font through the
/// _[stylistic set]($text.stylistic-set) 1_ (`ss01`) feature. To use it in
/// Typst, you could then define your own version of `scr` like this:
///
/// ```example
/// #let scr(it) = text(
/// features: ("ss01",),
/// stylistic-set: 1,
/// $cal(it)$,
/// )
///

View File

@ -18,7 +18,7 @@ $ "hi ∅ hey" $
$ sum_(i in NN) 1 + i $
--- math-font-features-switch ---
#let scr(it) = text(features: ("ss01",), $cal(it)$)
#let scr(it) = text(stylistic-set: 1, $cal(it)$)
$cal(P)_i != scr(P)_i$, $cal(bold(I))_l != bold(scr(I))_l$
$ product.co_(B in scr(B))^(B in scr(bold(B))) cal(B)(X) $
@ -29,7 +29,7 @@ $ product.co_(B in scr(B))^(B in scr(bold(B))) cal(B)(X) $
(name: "XITS Math", covers: regex("[\u{1D49C}-\u{1D503}]")),
"New Computer Modern Math"
),
features: ("ss01",),
stylistic-set: 1,
)
$ cal(P)_i (X) * cal(C)_1 $