I have a set of local fonts that I'd like to apply on my text in PangoML.
AFAIK the way to specify fonts is through the font family attribute in the span element. But where/how can I specify a path to the otf file containing the fonts I'd like to use?
I've also tried setting the font through imagemagick, but then it seems to apply the font to multiple texts.
graphicsMagick(900, 150, "#FCF6EA")
.font(`${__dirname}/static/fonts/Graphik-SemiBold.otf`, 1)
.fontSize(52)
.out('-background', '#FCF6EA')
.out('-size', '890x', 'pango:TOPTEXT_WITH_FIRST_FONT'
.out('-gravity', 'NorthWest', '-geometry', '+10+10')
.out('-compose', 'atop')
.out('-size', '850x', 'pango:BOTTOMTEXT_WITH_DIFFERENT_FONT')
.out('-gravity', 'SouthWest', '-geometry', '+30+10')
.out('-compose', 'atop')
.out('-composite')