


Those are the locations. For example on my Mac, I have it at /usr/local/etc/ImageMagick-6/type.xmlUnder Unix and Linux, ImageMagick searches for each of the configuration files listed above by looking in the locations given below, in order, and loads them if found:
$MAGICK_CONFIGURE_PATH
$PREFIX/etc/ImageMagick-7
$PREFIX/share/ImageMagick-7
$XDG_CACHE_HOME/ImageMagick
$HOME/.config/ImageMagick
<client path>/etc/ImageMagick
with -annotate and -font .snibgo wrote: 2018-09-25T17:06:14-07:00 @dt59: Please also say how you want to use the font, eg with "-annotate" or "label:" or "pango:" or an SVG input.
fred, am not using the php Imagick am actually using the php exec() with imagemagick command.fmw42 wrote: 2018-09-25T17:00:02-07:00 What platform? What version of Imagemagick? See https://imagemagick.org/script/resources.php for a list of locations where you can put it. I am not sure if that works properly with PHP Imagick. The Perl script needs to be run from a terminal window. I do not know much else about using it, especially if on Windows. I think you need to use type-windows.xml if on Windows.
That link says:
Those are the locations. For example on my Mac, I have it at /usr/local/etc/ImageMagick-6/type.xmlUnder Unix and Linux, ImageMagick searches for each of the configuration files listed above by looking in the locations given below, in order, and loads them if found:
$MAGICK_CONFIGURE_PATH
$PREFIX/etc/ImageMagick-7
$PREFIX/share/ImageMagick-7
$XDG_CACHE_HOME/ImageMagick
$HOME/.config/ImageMagick
<client path>/etc/ImageMagick
But you can always just use the path to the font file.
What do you mean by custom font? Is it a ttf or otf font? Only certain types of fonts can be used in Imagemagick.
I think am using the right command line, am actually on a local server(my machine) .fmw42 wrote: 2018-09-25T18:59:41-07:00 What is your command line? Perhaps you have specified it wrong. There should be no reason that you could not use the path to the font. What platform are you on? Is this your server/computer or a hosted server? You are missing fontconfig from your delegates. Try installing that and then run your command again with the full path.
fmw42 wrote: 2018-09-26T09:49:20-07:00 Sorry, but I use a Mac. So I do not know how to install delegates on Linux. I think you must install the delegate, then recompile Imagemagick. But some Linux distros usually come with all the nominal needed delegates installed with Imagemagick.
See
https://www.freedesktop.org/wiki/Software/fontconfig/
https://imagemagick.org/script/download.php
https://imagemagick.org/script/install-source.php#unix
https://imagemagick.org/script/advanced ... lation.php
Code: Select all
magick C:\xampp\htdocs\namewish\storage\app\private\image\main-footer-bg_1537788924.jpg ( ( -size 500\x50 xc:none -fill red -font C:\xampp\htdocs\namewish\storage\app\private\Font\pound.ttf -pointsize 35 -gravity center -annotate +0+0 "Welcome My Friends" ) ( -size 500\x50 xc:none -fill red -font Font/pound.ttf -pointsize 35 -gravity center -annotate +0+0 "Your Friend Name 1 " ) ( -size 500\x50 xc:none -fill red -font C:\xampp\htdocs\namewish\storage\app\private\Font\pound.ttf -pointsize 35 -gravity center -annotate +0+0 "Your Friend Name 1 " ) -alpha set -background none -smush 10 +gravity -alpha set -background none -rotate 0 ) -geometry +50+200 -background none -compose over -composite C:\xampp\htdocs\namewish\storage\app\public\thumbnails\2.png
Code: Select all
magick path_to\main-footer-bg_1537788924.jpg -fill red -font path_to\pound.ttf -pointsize 35 -gravity northwest -interline-spacing -5 -annotate +50+200 "Welcome My Friends\nYour Friend Name 1 \nYour Friend Name 1 " path_to\2_new.png
Code: Select all
f:\web\im>%IMG7%magick -size 200x200 xc: -font f:\web\im\annifont.ttf -gravity Center -annotate 0 "Hi" x.png
magick: unable to read font `f:webimannifont.ttf' @ warning/annotate.c/RenderType/1009.
Code: Select all
f:\web\im>%IMG7%magick -size 200x200 xc: -font f:\\web\\im\\annifont.ttf -gravity Center -annotate 0 "Hi" x.png
f:\web\im>%IMG7%magick -size 200x200 xc: -font f:/web/im/annifont.ttf -gravity Center -annotate 0 "Hi" x.png