Using Typst 0.15.1, I’m trying to use Playfair variable font (ttf files downloaded from same Github repo as issue below).
The issue I have is that only “Playfair Micro” is available, and not other variants (e.g. “Title”, “Thin”, “Display”, etc…). These variants are quite different, especially since “Micro” intended use seems to be at very small font size (5pt). There is an open issue seemingly related on the font repo (here), I’m still not sure if that is a limitation of the font or of Typst, and what workaround could be used. I tried extracting a static font with “opsz” at e.g. 12pt with fonttoolslike in this post, but I get the exact same render (and same “Playfair Micro” name). In e.g. TextEdit I can see all the variants.
For comparison, here is what I get in TextEdit, using Playfair Title, at 12pt, saved to pdf:
An here is what I get with Typst, using the only option Playfair Micro, again 12pt (normal weight):
The lines are thicker (especially horizontal ones), as well as serifs (quite striking on p and q).
My font knowledge is quite limited, so I’m not sure how to work around this issue, any help would be appreciated, thanks!
You can inspect what Typst knows with typst fonts --variants. As shown below, PlayfairRomanVF.ttf indeed provides only a single font named Playfair Micro, and it supports optical sizes from 5 pt to 1200 pt.
Thank you for your answer, that got me on the right track! I got confused about the different names, but everything is actually available in Typst.
After playing around with fonttools I manage to get the actual definitions of all these font variants, which are just variations on opsz, wdth and wght (didn’t know that), e.g.: