Greek character support

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sysakmin
Posts: 5
Joined: 2010-02-19T02:44:31-07:00
Authentication code: 8675308

Greek character support

Post by sysakmin »

Hi,

We are use ImageMagick version 6.5.9-10 in Linux

We are trying to annotate an image with Greek characters using the command below

/opt/imagemagick65910/bin/convert -size 620x50 xc:none -font /appl/fonts/el/Style1.ttf -pointsize 30 -fill \#FFFFFF -gravity center -annotate 0 "Εγγεγραμμένων" -trim /appl/howiz/design1286/color1/titles/text.png

Though the fonts supports (Style1.ttf ) greek characters, we get junk characters instead of Greek characters in the output image when we run the above command.

Please help us to solve this issue. Any help from you regarding this would be highly appreciated.

Regards,
Vijay
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Greek character support

Post by snibgo »

This is either a command-line problem, or a font problem. When I put those Greek characters in a text file (without a leading Byte Order Mark) and issue:

Code: Select all

convert -size 620x50 xc:none -font c:\windows\fonts\Arialuni.ttf -pointsize 30 -fill "#FFFFFF" -stroke red -gravity center -annotate 0x0 @gktext.txt -trim +repage gktext.png
I get the expected image.

(This is on Windows 7, on both IM 6.6.0-8 and 6.5.8.)
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Greek character support

Post by fmw42 »

see http://www.imagemagick.org/Usage/text/#unicode

you need to put the text into a file that utf-8 compliant. that is the text editor must be in utf-8 compliant mode.
Post Reply