Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Have been trying to use a custom font and after some research i found "creating a type.xml file and using the imagemagick_type_gen script " my question where do i put these the type.xml file in my php project and how do i run the perl script(imagemagick_type_gen), note am using PHP. Please help>>!!
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:
Under 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:
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.
with -annotate and -font .
though i have try to specify the absolute path but is not working and due to the architecture of my application i can not use the relative path. that's why am in search for another alternative.
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:
Under 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:
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-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.
I think am using the right command line, am actually on a local server(my machine) .
Fred, please how do I correct my fontconfig from my delegates? or how do I install it? to correct the fonconfig problem.
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.
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.
So does that command work or not? If not, what happens? Can you post a link to your input image and to the font (pound.ttf), so that I can test your command.
I do not know how to install delegates on Windows. But one of the Windows users can probably help.
In one place in your command you use -font Font/pound.ttf rather than the full path to the font that you use in all the other places. Is that what you want?
Note that you do not need to create new transparent images to use -annotate. It will write directly to your input image in the location you specify with +X+Y in the annotate command. You do not need parentheses to do that. You can also put all the text into one -annotate command with newlines and then use -interline-spacing to adjust the spacing. Using negative values moves the lines closer together. Here is a command to do that. Put your font in there and your paths.