Hacker News new | ask | show | jobs
by ThinkBeat 619 days ago
What is the story with the fonts Typst uses? Does it come with a standard library of fonts?

I am not a fan of LaTex myself, but I admire it to some extent.

Other systems come along that are less verbose and easier to write, and faster. Yay.

And then people use it, and then someone thinks "oh we should have this function", "We need to add a feature for it to work well" etc etc and slowly the system either bloats, and at some point, a person will look back at LaTeX and go

"Oh that is why this existed, and ah that is why this is slow"

Or one can choose to keep the new system simple and simply use LateX when something more is required.

1 comments

Adding a font is just `#set text(font: "besley")` or you can use a list for fallback like `#set text(font: ("jost", "noto sans")`. Then you can select weight, italic/bold, opentype features, ligatures, etc. as options on `text` with the same syntax.

You can see all the options for `text` here: https://typst.app/docs/reference/text/text It will likely need some reorganization in time, but is quite functional.

The command line comes with a few defaults such as the open source Libertinus for text or New CMM for math, but may fall back to your System fonts for characters like emoji (and there are flags to disable system fonts). You can also set a specific path to look up font files.

And then the web app has plenty of fonts in an extensive dropdown, and supports dropping in custom font files that will be automatically recognized.

I believe one current limitation is bitmap fonts not working properly, but that is being actively developed by a contributor.

I'm optimistic that Typst won't run into the issues you mention. I see it as doing well at incorporating the knowledge of the past into simpler, better interfaces.