Using fonts in custom fontconfig directories for SVG Conversion

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Morgon
Posts: 7
Joined: 2016-09-01T08:42:55-07:00
Authentication code: 1151

Using fonts in custom fontconfig directories for SVG Conversion

Post 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?)
Morgon
Posts: 7
Joined: 2016-09-01T08:42:55-07:00
Authentication code: 1151

Re: Using fonts in custom fontconfig directories for SVG Conversion

Post 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.
Post Reply