From 720f01a11c9e7238566d334e15412797906d41c2 Mon Sep 17 00:00:00 2001 From: Malo <57839069+MDLC01@users.noreply.github.com> Date: Fri, 22 Aug 2025 17:27:56 +0100 Subject: [PATCH] Fix `sub` and `super` oneliners (#6791) --- crates/typst-library/src/text/shift.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/typst-library/src/text/shift.rs b/crates/typst-library/src/text/shift.rs index aaca7faf9..2a6494c92 100644 --- a/crates/typst-library/src/text/shift.rs +++ b/crates/typst-library/src/text/shift.rs @@ -14,11 +14,11 @@ use crate::text::{FontMetrics, ScriptMetrics, TextSize}; /// ``` #[elem(title = "Subscript")] pub struct SubElem { - /// Whether to create artificial subscripts by lowering and scaling down - /// regular glyphs. + /// Whether to use subscript glyphs from the font if available. /// /// 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 /// regardless of whether the font provides dedicated subscript glyphs. When @@ -69,11 +69,11 @@ pub struct SubElem { /// ``` #[elem(title = "Superscript")] pub struct SuperElem { - /// Whether to create artificial superscripts by raising and scaling down - /// regular glyphs. + /// Whether to use superscript glyphs from the font if available. /// /// 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 /// regardless of whether the font provides dedicated superscript glyphs.