I do use unicode in my workflow (editor, fileā¦) and some unicode such as : orā:muscle:, are well represented in my editor, but the pdf have difficulties to display them. I got a ļæ½ in the pdf, but get a good display within html output.
Typst natively support unicode, and even has an emoji module to easily insert emojis into your document (in your case, emoji.finger.front and emoji.arm.muscle in case you donāt want to copy/paste emojis directly into the source code.
Make sure the font that you are using supports emojis
I think the emoji font you use might be the problem. You could try to use a different font that provides emojis.
If you havenāt explicitly set an emoji font, Typst falls back to one available on the system you compile the document on.
Still, Iām not an expert and I work on debian. Iāve simply downloaded the typst tool (which I think does not include the font family). The compilator (typst) does not raise any errors.
Does someone can tell me how to download a specific font family for the emoji and how to include it ?
Despite everything, I think that the typst tool should include its own font library with the fonts and the emoji, so that it does not depends on some difficult topic, that a normal person can handle.
I think Typst aims to let the user access all Unicode symbols and emojis with nice names like emoji.finger.front (itās an ongoing work, see the typst/codex project). Embedding fonts in the Typst binary to cover all these symbols would make it significantly larger, but maybe at some point an emoji font will be includedā¦
To install an emoji font, maybe the best option is Noto Color Emoji.
On Debian you can get the rasterized version of Noto Color Emoji with apt install fonts-noto-color-emoji (this is actually what you get by installing texlive-fons-extra as it has a ārecommendedā dependency on fonts-noto-color-emoji, but then you also install a ton of other dependencies).
Once you have the COLRv1 file, copy it to ~/.local/share/fonts (create this directory if it doesnāt exist already). Thatās it, the font is installed.
Indeed fonts, and in particular emojis, seem to be a common issue and I think supporting new users set up correct fonts could be something a future release improves. The page you link to actually tells us that typst ships with a few fonts,
Typst uses your installed system fonts or embedded fonts in the CLI, which are Libertinus Serif, New Computer Modern, New Computer Modern Math, and DejaVu Sans Mono
However, the same page also tells us that
The priority is: --font-path > system fonts > embedded fonts
Meaning that typst prioritises user-defined fonts over embedded ones. This means that if you have previously installed a font that typst ships with, typst will not use the embedded font even on a clean install, regardless of if you intended for this to happen or not.
What I find confusing here is that editor and browser can show the emoji, so wouldnāt that mean that the font is installed, but in a way that isnāt recognized by Typst? I can imagine that browsers embed some fonts on their own, but the editor too?