Additional fonts on shared host
Re: Additional fonts on shared host
That code is for the php API called Imagick which interacts with Imagemagick.
That explains why you can not see convert.
That explains why you can not see convert.
Re: Additional fonts on shared host
Even more confused now then. So there's only reference to Imagick and not Imagemagick itself. Is there anyway for me to call a font folder that exists outside of the root of the shared server?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Additional fonts on shared host
see http://www.php.net/manual/en/imagick.setformat.php and jut put the full path to your font as the argument
Re: Additional fonts on shared host
I've added the path to the font folder:
$image = setFont("/fonts");
But no dice...
$image = setFont("/fonts");
But no dice...
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Additional fonts on shared host
It must be the full path to where you put your fonts on your account including the font filename and suffix. I assume you did not put your fonts in root
Re: Additional fonts on shared host
My hosts finally agreed to create a .magick directory for me at $HOME, so I'm now able to see my custom fonts when I run convert -list font. BUT on svg to png convert the font always defaults to arial. I've tested with a system font too and the same occurs.
I've seen a few posts about this but no solutions. Does anyone have any ideas?
I've seen a few posts about this but no solutions. Does anyone have any ideas?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Additional fonts on shared host
What svg delegate are you using for rendering? IM MSVG (xml), RSVG or Inkscape. The internal IM MSVG is not a good as the other two. Check your delegates and see what is being used.
Re: Additional fonts on shared host
My output for svg delegates is :
svg => "rsvg" "%i" "%o"
svg => "rsvg" "%i" "%o"
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Additional fonts on shared host
what delegates show from
convert -version
or
convert -list configure
on the line starting with Delegates
convert -version
or
convert -list configure
on the line starting with Delegates
Re: Additional fonts on shared host
convert -version shows:
Version: ImageMagick 6.6.0-4 2012-05-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
convert -list configure shows:
DELEGATES bzlib djvu fontconfig freetype gvc jpeg jng jp2 lcms lqr openexr png rsvg tiff x11 xml wmf zlib
Version: ImageMagick 6.6.0-4 2012-05-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
convert -list configure shows:
DELEGATES bzlib djvu fontconfig freetype gvc jpeg jng jp2 lcms lqr openexr png rsvg tiff x11 xml wmf zlib
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Additional fonts on shared host
I am at a loss. Perhaps you should post a link to your svg file so others can see if it is valid. Also post your full command?
Can you test using PHP exec() rather than Imagick. Perhaps there is an issue with Imagick. exec() is more direct and uses the command line syntax.
Can you test using PHP exec() rather than Imagick. Perhaps there is an issue with Imagick. exec() is more direct and uses the command line syntax.
Re: Additional fonts on shared host
I've put an example svg in dropbox (with courier-bold font embedded)
https://www.dropbox.com/s/kgfd2daeqxbqr ... atBack.svg
My developer is going to try PHP exec() I think, though shared hosting may mean this isn't possible.
https://www.dropbox.com/s/kgfd2daeqxbqr ... atBack.svg
My developer is going to try PHP exec() I think, though shared hosting may mean this isn't possible.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Additional fonts on shared host
This works fine for me, though I do not have the font referenced or it is a bad reference in the svg file. I am not an expert on svg. But it still makes the output image
convert: non-conforming drawing primitive definition `Courier-Bold''' @ error/draw.c/DrawImage/3164.
Code: Select all
convert BirdBoxClaretFlatBack.svg -resize 600x600 BirdBoxClaretFlatBack.png
Re: Additional fonts on shared host
I'm not sure if I've saved the svg correctly as the only reference is <text transform="matrix(1 0 0 1 52.4165 279.9727)" fill="#2B2A2B" font-family="'Courier-Bold'" font-size="11">Simon & Tim - 42 Greenwood Way, Manchester, MC5 7UH</text>
I've tried saving the svg with options - Fonts/Type - SVG and no subsetting - but no change
I've tried saving the svg with options - Fonts/Type - SVG and no subsetting - but no change
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Additional fonts on shared host
BirdBoxClaretFlatBack.svg contains:
Unless you have a font family named 'Courier-Bold' (including the quotes), this will fail.font-family="'Courier-Bold'"
snibgo's IM pages: im.snibgo.com