1) downloading the font from google as a tff, saving it to a file under /tmp.
2) Saving a custom types.xml file like:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE typemap [
<!ELEMENT typemap (type)+>
<!ELEMENT type (#PCDATA)>
<!ELEMENT include (#PCDATA)>
<!ATTLIST type name CDATA #REQUIRED>
<!ATTLIST type fullname CDATA #IMPLIED>
<!ATTLIST type family CDATA #IMPLIED>
<!ATTLIST type foundry CDATA #IMPLIED>
<!ATTLIST type weight CDATA #IMPLIED>
<!ATTLIST type style CDATA #IMPLIED>
<!ATTLIST type stretch CDATA #IMPLIED>
<!ATTLIST type format CDATA #IMPLIED>
<!ATTLIST type metrics CDATA #IMPLIED>
<!ATTLIST type glyphs CDATA #REQUIRED>
<!ATTLIST type version CDATA #IMPLIED>
<!ATTLIST include file CDATA #REQUIRED>
]>
<typemap>
<type
format="ttf"
name="crafty girls"
fullname="crafty girls"
family="crafty girls"
glyphs="/tmp/crafty girls.ttf"
style="normal"
stretch="normal"
weight="400"/>
</typemap>
Code: Select all
exec('fc-cache -v ' . $this->fontDir);
Code: Select all
putenv('MAGICK_FONT_PATH=' . $this->fontDir);
Code: Select all
$convert --version
Version: ImageMagick 6.8.9-10 Q16 x86_64 2015-07-20 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr lzma openexr pangocairo png rsvg tiff x xml zlib
$convert -list format | grep SVG
MSVG rw+ ImageMagick's own SVG internal renderer
SVG rw+ Scalable Vector Graphics (RSVG 2.40.2)
SVGZ rw+ Compressed Scalable Vector Graphics (RSVG 2.40.2)