Why doesn't `smallcaps` work for Libertinus Serif?

Hi, I find the #smallcaps function does not work on my MacBook (macOS 15.4.1 (24E263)). I’ve tried Typst 0.13.1 in the terminal and VS code Tinymist
0.13.12, and they both compiled a pdf like this:

#smallcaps[Smallcaps]

#smallcaps[Libertinus Serif]

#text(font: "New Computer Modern", features: ("smcp",), [New Computer Modern])

I guess this may result from the font “Libertinus Serif”, but the web editor typst.app (compile Typst 0.13.1) works well:

What can I do to address this issue? If any addition information needed, please tell me. :blush:
Thanks for you help in advance! :coffee:

Interesting. I’m on macOS 15.4.1, using VSCode + Tinymist 0.13.12 and the following input works just fine:

#smallcaps[Test]

Ie. I get smallcaps. I’d first try reinstalling Tinymist. Maybe even remove Typst installation if you also have that. Just to make sure it uses the latest version and there are no odd font conflicts. Also make sure you have not installed a font with similar name manually to Font Book.

But, I’m just guessing and throwing ideas. Have not encountered this.

Hi @XIONG, welcome to the Typst forum! I’ve updated your question title to follow our guidelines.

Maybe you have a local version of Libertinus Serif that doesn’t include the smallcaps? Can you try to compile the document with typst compile --ignore-system-fonts file.typ ?

See here for more details on Typst’s font handling.

2 Likes

Thank you for your reply! You’re right. After I removed my local Libertinus Serif, smallcaps() works. :blush:

1 Like

Thank you for your reply! You’re right. smallcaps() works now. :blush:

In addition, I find that I should install ’.otf’ file rather than ‘.ttf’. ’.otf’ local font file supports ‘smallcaps’ :)