Fix sub and super oneliners (#6791)

This commit is contained in:
Malo 2025-08-22 17:27:56 +01:00 committed by GitHub
parent f9caddc6d3
commit 720f01a11c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,11 +14,11 @@ use crate::text::{FontMetrics, ScriptMetrics, TextSize};
/// ``` /// ```
#[elem(title = "Subscript")] #[elem(title = "Subscript")]
pub struct SubElem { pub struct SubElem {
/// Whether to create artificial subscripts by lowering and scaling down /// Whether to use subscript glyphs from the font if available.
/// regular glyphs.
/// ///
/// Ideally, subscripts glyphs are provided by the font (using the `subs` /// Ideally, subscripts glyphs are provided by the font (using the `subs`
/// OpenType feature). Otherwise, Typst is able to synthesize subscripts. /// OpenType feature). Otherwise, Typst is able to synthesize subscripts by
/// lowering and scaling down regular glyphs.
/// ///
/// When this is set to `{false}`, synthesized glyphs will be used /// When this is set to `{false}`, synthesized glyphs will be used
/// regardless of whether the font provides dedicated subscript glyphs. When /// regardless of whether the font provides dedicated subscript glyphs. When
@ -69,11 +69,11 @@ pub struct SubElem {
/// ``` /// ```
#[elem(title = "Superscript")] #[elem(title = "Superscript")]
pub struct SuperElem { pub struct SuperElem {
/// Whether to create artificial superscripts by raising and scaling down /// Whether to use superscript glyphs from the font if available.
/// regular glyphs.
/// ///
/// Ideally, superscripts glyphs are provided by the font (using the `sups` /// Ideally, superscripts glyphs are provided by the font (using the `sups`
/// OpenType feature). Otherwise, Typst is able to synthesize superscripts. /// OpenType feature). Otherwise, Typst is able to synthesize superscripts
/// by raising and scaling down regular glyphs.
/// ///
/// When this is set to `{false}`, synthesized glyphs will be used /// When this is set to `{false}`, synthesized glyphs will be used
/// regardless of whether the font provides dedicated superscript glyphs. /// regardless of whether the font provides dedicated superscript glyphs.