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
annotate utf8 magick++
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: annotate utf8 magick++
Make sure you have a font that included the UTF characters, and that your environment 'locale' is set to use UTF.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: annotate utf8 magick++
simple call:
and no success...
Code: Select all
image->font("arial");
image->textEncoding("UTF-8");
image->annotate(annotate_text, text_geometry);
Re: annotate utf8 magick++
SOLVED:
It is required full path specification to unicode font.
for example:
It is required full path specification to unicode font.
for example:
Code: Select all
magick_image->font("/usr/share/fonts/truetype/unfonts/tahoma.ttf");
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: annotate utf8 magick++
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).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/