typst: Prime symbol broken with Libertinus Math
Description
The prime symbol seems incorrectly set in superscript when using Libertinus Math.
#show math.equation: set text(font: "Libertinus Math")
$
f(x) &= x^2 + 1 \
f'(x) &= 2 x
$
This happens in both the Web App and the command-line interface.
Web App:
Local:
Reproduction URL
No response
Operating system
Web app, Linux
Typst version
- I am using the latest version of Typst
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 21 (9 by maintainers)
I don’t think there’s any plan to change the math font.
On Polytype, the self-proclaimed “Rosetta stone for typesetting engines”, I think this issue is manifesting itself.
The second item in their “Sample Gallery” shows Typst output for:
and it really highlights how “bad” the
f'(x)looks when compared to the rendering for sile and xelatex.I don’t know if the best response is to suggest to Polytype that they use the
"ssty"mentioned above (or writef primeinstead off'), or if effort should be spent identifying some alternative fixBut since this seems like it might be presenting Typst in a poor light in a fairly visible website (Polytype was recently featured on hackernews), it might be worth looking into.
This is probably a font issue not a typesetting engine one. Whether it is a bug or a style choice I’m not actually sure. I’m the maintainer of Libertinus fonts project but was not the original author of the Math companion font. Either way please feel free to file an issue over here.