How to fix unknown font warning?

Hi,

The “eb garamond” font is installed on my computer. I can see it listed in the font manager. But still Typst does not takes and issues the following warning:

Warning: unknown font family: eb garamond

I have the following line in my typ file:

#set text(font: “EB Garamond”, size: 12pt)

Thank you.

Hello! What operating system are you on? On Linux you can use fc-list to make sure a font is recognized, and what its canonical name is.

Thank you for the quick reply,

I am using Linux [Ubuntu 22.04.5 LTS].

I installed EB Garamond from Google Fonts. This is the output of command for me.

❯ fc-list : family | grep EB
EB Garamond,EB Garamond SemiBold
EB Garamond
EB Garamond,EB Garamond Medium
EB Garamond,EB Garamond ExtraBold

On Ubuntu, fc-list is provided by fonttools:

sudo apt install fonttools

EDIT:
Sorry, I meant fontconfig !

sudo apt install fontconfig

Also you can try on the command line:

typst fonts

To list all fonts available to the compiler. Perhaps the font name is different?

2 Likes

I get the following on my machine:
fc-list : family | grep EB
EB Garamond

So it is installed

Hint of the day :wink:
Could you please edit your posts instead of adding a second one if you forgot something.

1 Like
The "EB Garamond" font is not listed when I type typst fonts on the command line
1 Like

Well, we are now back to Which fonts are included in the compiler? - #3 by SebastianJL

Could you try to compile with:

# Adds additional directories to search for fonts.
typst compile --font-path path/to/fonts file.typ
1 Like

The following solution works for me. Thank you.

typst compile --font-path path/to/fonts file.typ
1 Like