Skip to content

Inconsistent appearance of super/subscripts when font lacks dedicated glyphs #7122

@apcamargo

Description

@apcamargo

Description

In Typst, the sub and super functions attempt to use the OpenType "subs" and "sups" font features (or Unicode subscript/superscript characters in versions prior to 0.13 #5777). However, when a font does not provide dedicated subscript or superscript glyphs, Typst falls back to generating faux superscripts or subscripts.

This fallback produces inconsistent and visually awkward results, particularly in contexts such as author lists in scientific papers:

Example of inconsistent superscripts

Code to reproduce:

#text(
  font: "Inter"
)[Foo#super("1"), Bar#super("1,2")]

I evaluated this behavior in Typst versions 0.13.1 and 0.14.

Reproduction URL

No response

Operating system

Web app

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestA proposal for changes to an existing featuretextText layout, shaping, internationalization, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions