[Fontconfig] Difficulty finding a font file through the libraries

Michael Brennen michael at fishnet.us
Thu Oct 28 20:09:14 UTC 2021


I was recently pulled into an application that uses fontconfig through ghostscript. There are nearly 9000 fonts in an application directory; adding that directory to the FC config worked, and gs finds the fonts it wants through FC.

We recently found that there is one font that is not working cleanly, 2- Moonglade Regular DEMO.ttf, available from herofonts.com <http://herofonts.com/>.

# fc-match -a MoongladeDEMO
2- Moonglade Regular DEMO.ttf: "Moonglade DEMO" "Regular"
2- Moonglade Regular DEMO.ttf.orig: "Moonglade DEMO" "Regular"

When gs runs it does not find the font from the .ttf file, but from an identical copy with ‘.ttf.orig’ at the end.

Loading MoongladeDEMO-Regular font from /var/www/ext/resources/fonts/2- Moonglade Regular DEMO.ttf.orig

If I remove the .ttf.orig file, gs does not find the font in the other file and Helvetica is substituted.

I was not involved with the project when they found that gs would find the font from a file with .orig or .bak or .copy at the end of the name, so I don’t know how they discovered that.

This is my first foray into fontconfig, so I am not sure where to begin looking for why the FC tools find the original font file, but gs accessing through the FC libraries does not. Any suggestions what might be happening?


   -- Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20211028/c2b2b8de/attachment.htm>

More information about the Fontconfig mailing list