Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent superscript numbers #4006

Open
1 task done
jounathaen opened this issue Apr 25, 2024 · 7 comments
Open
1 task done

Inconsistent superscript numbers #4006

jounathaen opened this issue Apr 25, 2024 · 7 comments
Labels
text Text layout, shaping, internationalization, etc.

Comments

@jounathaen
Copy link

Description

In the following code, the first three numbers of the footnotes are bold (?), and from four onward they are not anymore. However, this does only happen with some fonts (like CMU Serif or CMU Serif Extra).

#set text(
  font: "CMU Serif",
)

= Header

Some text with footnotes.

test #footnote[asdf 1 asdf]
test #footnote[asdf 2 asdf]
test #footnote[asdf *3* asdf]
test #footnote[asdf 4 asdf]
test #footnote[asdf *5* asdf]

Result:

image

and

image

(Using typst 0.11.0 (2bf9f95d))

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst
@jounathaen jounathaen added the bug Something isn't working label Apr 25, 2024
@Enivex
Copy link
Collaborator

Enivex commented Apr 25, 2024

Try setting the typographic option of https://typst.app/docs/reference/text/super/ to false

I suspect some of the fonts may not include all the necessary codepoints

@jounathaen
Copy link
Author

Yes, that is a valid workaround. Thanks

@Enivex Enivex added text Text layout, shaping, internationalization, etc. needs-investigation More investigation is necessary. labels Apr 25, 2024
@laurmaedje
Copy link
Member

I don't think there's anything we can do about this. The font just doesn't have more of those glyphs.

@jounathaen
Copy link
Author

It is probably not a good idea for all superscript cases, but for footnote numbers it might make sense to emit a warning if some numbers have superscript glyphs, but a certain one has not.
Like The selected font has no superscript glyph for '4'. Try disabling the "typographic" option of "super" for consistency

@laurmaedje laurmaedje removed needs-investigation More investigation is necessary. bug Something isn't working labels Apr 29, 2024
@laurmaedje laurmaedje changed the title Only the first three footnote numbers are set bold for some fonts Inconsistent superscript numbers Apr 29, 2024
@Enivex
Copy link
Collaborator

Enivex commented Apr 29, 2024

I don't think there's anything we can do about this. The font just doesn't have more of those glyphs.

What about only enabling the typographic option in the case the font has a complete set of script characters?

The transition is the distracting part.

@laurmaedje
Copy link
Member

That sounds like a quite good idea.

@laurmaedje
Copy link
Member

We'll need to check how coverage looks for common fonts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
text Text layout, shaping, internationalization, etc.
Projects
None yet
Development

No branches or pull requests

3 participants