Page 1 of 1
annotate utf8 magick++
Posted: 2008-10-16T07:17:43-07:00
by nicolas1
Hello,
I have a problem to make "annotate" produce right russian symbols. Input string is in utf8 encoding, the output results in not correct symbols. Seems as ansi of utf8.
How can to output symbols correct in magick++ or magick core?
Thanks
Re: annotate utf8 magick++
Posted: 2008-10-16T22:52:12-07:00
by anthony
Make sure you have a font that included the UTF characters, and that your environment 'locale' is set to use UTF.
Re: annotate utf8 magick++
Posted: 2008-10-17T05:12:02-07:00
by nicolas1
simple call:
Code: Select all
image->font("arial");
image->textEncoding("UTF-8");
image->annotate(annotate_text, text_geometry);
and no success...
Re: annotate utf8 magick++
Posted: 2008-10-22T20:39:06-07:00
by nicolas1
SOLVED:
It is required full path specification to unicode font.
for example:
Code: Select all
magick_image->font("/usr/share/fonts/truetype/unfonts/tahoma.ttf");
Re: annotate utf8 magick++
Posted: 2008-10-27T00:04:00-07:00
by anthony
Yes, unless the font is added to either the system "type.xml" or the users "type.xml" file. See notes about this on the top level of IM examples. (I really should move this into the 'fonts' section).