Note that there are some explanatory texts on larger screens.

plurals
  1. POImageMagick unicode font installation on linux not working
    primarykey
    data
    text
    <p>I have ImageMagick installed on my CentOS linux server.</p> <p>I am trying to get ImageMagick to convert unicode (non-roman) fonts to an image. I am able to do this with roman/Latin based fonts but not non-latin such as chinese.</p> <p>EDIT* When I try to convert non-latin fonts they show up as garbage such as %$??W*??</p> <p>I have installed unicode fonts on my system and update the ImageMagick type.xml file to reflect this (i have update my locate db as well).</p> <p>when I run (in my shell):# identify -list Type </p> <p>I can see that my fonts are installed and that ImageMagick sees them but they (non-latin fonts) still do not work when I run my text-to-image conversion php script</p> <p>I have checked out another article relating to this : <a href="https://stackoverflow.com/questions/2650882/make-imagemagick-recognize-a-font">Make ImageMagick recognize a font</a> </p> <p>But after doing everything there I still have the same problem. Please help.</p> <p>Thanks.</p> <p>EDIT: This is the some code related to imagemagick initialization: </p> <pre><code> $font = 'UNICODE.TTF'; /* Create imagickdraw object */ $draw = new ImagickDraw(); $draw-&gt;setFont($font); $draw-&gt;setStrokeAntialias(true); $draw-&gt;setTextAntialias(true); $draw-&gt;setFontSize(100); $draw-&gt;setTextEncoding("UTF-8"); //and than there is a bunch of code I use to manipulate the image shadow etc. </code></pre> <p><em>UPDATE</em> Since receiving help via the comments to this post I have learned:</p> <ol> <li><p>That ImageMagick is capable of converting unicode non-latin characters This was tested by passing a hebrew word to ImageMagick via the linux command line.</p></li> <li><p>Therefore the problem is in the ImageMagick PHP module's ability to interpret unicode non-latin text.</p></li> <li><p>The php file itself has all the necessary elements to support UTF-8 and does in fact create a file with a filename derived from the same text varible I am passing to ImageMagick for image creation. The filename is successfully saved on my server by the php in non-latin unicode text.</p></li> </ol> <p>I have looked around on the net and cannot find any information on this issue when it comes to using the ImageMagick PHP modules to create and image from text in unicode non-latin font.</p> <p>Could this be a ImageMagick bug? Any help would be appreciated. thanks. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload