#FontAwesome not recognized by Typst

14 messages · Page 1 of 1 (latest)

meager harness
#

Hello! I am on Fedora 41 and I have installed FontAwesome (free) which can be observed in ~/.local/share/fonts (first picture). However, it doesn't seem to be recognized by Typst as when I type typst fonts --variants there is not trace of FontAwesome (second picture). If I type typst fonts --font-path ~/.local/share/fonts/, it does acknowledge FontAwesome (third picture). But it is still broken in my document (fourth picture).

Any help would be appreciated.

rose urchin
#

I’m not sure, but I think you have to explicitly say you want to use fontawrsome for that character

meager harness
#

If I want to draw a fontawesome icon, I use the following syntax: #fa-pen-to-square()

meager harness
#

I honestly don't know what I'm supposed to do. That might be stupid, but I haven't found a solution. 😦

pulsar hawk
#

Have you tried putting the fonts into the project's directory?

meager harness
pulsar hawk
#

Could you show a code fragment including this font?

meager harness
#

Well, this is very simple, for instance:

// see: https://typst.app/universe/package/fontawesome
#import "@preview/fontawesome:0.5.0": *

#let tip(it) = thbox(
  title: fa-lightbulb(), 
  content: it, 
  color: orange
)
#

and when compiling I get this warning

#

So it is supposedly not installed, even though I have installed it.

pulsar hawk
#

I see. Have you renamed the font file in your directory to "Font Awesome 6 Free"? I've had the same issue on Mac until I've renamed the font file to "Font Awesome 6 Free.otf" (I use an OpenType variant.) Ofc it may not work on Linux well but it seems that Typst tries to load a font file with the specific title

meager harness
still surge