Page 1 of 1

Using fonts in custom fontconfig directories for SVG Conversion

Posted: 2016-09-01T08:57:42-07:00
by Morgon
Hello. I've been trying to gather everything I can about ImageMagick's SVG handling(/offloading) with custom fonts.

I've learned that I have to place the fonts in directories that are scanned by fontconfig. As such, if I put my fonts in '/usr/local/share/fonts', for example, the conversion from SVG to PNG/PDF works just fine (which is invoked via IMagick).

However, through fontconfig's 'local.xml', I've defined a custom directory so that I don't have to copy fonts into the system path. fc-match does pick up these fonts as I add new ones to the directory. Unfortunately, ImageMagick (or RSVG? I'm still unclear on the relationship between the two libraries) does not render these fonts unless I explicitly copy them to /usr/local/share/fonts (or perhaps other directories directly in fonts.conf; I haven't checked that yet).

This may ultimately be a fontconfig question, but again, these are registered in fc, but it's IM that's not properly picking them up (through IMagick.. I just tested 'convert' on the command line and I get custom fonts... so could this be an IMagick-specific issue somehow?)

Re: Using fonts in custom fontconfig directories for SVG Conversion

Posted: 2016-09-01T09:11:42-07:00
by Morgon
I should note that I've symlinked this custom directory into /usr/local/share/fonts, but they are still not being picked up. It isn't until I specifically copy one of the files from the sub-tree into the parent './fonts' directory that it is properly used.