SVG to png font madness
Posted: 2014-02-22T05:04:11-07:00
I have custom fonts installed on my shared server that are present in convert -list font.
Font: AmaticSC
family: Amatic SC
style: Undefined
stretch: Undefined
weight: 0
glyphs: /home/under/www/devel/jb_fonts/AmaticSC-Regular.ttf
I have a functioning type.xml in $HOME/.magick (thank you Anthony for the script) that is present first in the list on convert -list font | grep Path:
My delegates are: DELEGATES bzlib djvu fontconfig freetype gvc jpeg jng jp2 lcms lqr openexr png rsvg tiff x11 xml wmf zlib
If I run convert -font AmaticSC -pointsize 72 label:Rhiannon test.png I get correct custom font in test.png
If I create an svg using that font - the output from Illustrator is this:
<text transform="matrix(1 0 0 1 42.2021 279.9727)" fill="#2B2A2B" font-family="'AmaticSC-Regular'" font-size="24">Rhiannon</text>
So when I run convert /home/under/www/testsite/test.svg test.png - I just get a default Arial font in the png. No errors.
I've tried changing the svg code to font-family="AmaticSC" (and removing single quotes) - but I cannot get the font in the final png.
I will donate a kidney to anyone who can help.
Font: AmaticSC
family: Amatic SC
style: Undefined
stretch: Undefined
weight: 0
glyphs: /home/under/www/devel/jb_fonts/AmaticSC-Regular.ttf
I have a functioning type.xml in $HOME/.magick (thank you Anthony for the script) that is present first in the list on convert -list font | grep Path:
My delegates are: DELEGATES bzlib djvu fontconfig freetype gvc jpeg jng jp2 lcms lqr openexr png rsvg tiff x11 xml wmf zlib
If I run convert -font AmaticSC -pointsize 72 label:Rhiannon test.png I get correct custom font in test.png
If I create an svg using that font - the output from Illustrator is this:
<text transform="matrix(1 0 0 1 42.2021 279.9727)" fill="#2B2A2B" font-family="'AmaticSC-Regular'" font-size="24">Rhiannon</text>
So when I run convert /home/under/www/testsite/test.svg test.png - I just get a default Arial font in the png. No errors.
I've tried changing the svg code to font-family="AmaticSC" (and removing single quotes) - but I cannot get the font in the final png.
I will donate a kidney to anyone who can help.