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?".
convert \
/tmp/black.png \
-font $1 \
-draw 'encoding "Latin 2" font-size 40 fill white gravity Center text 0,0 "aącćeęlłnńoósśzżxź
AĄCĆEĘLŁNŃOÓSŚZŻXŹ"' \
/tmp/font_$1.png
It comes that most of characters are rendered correctly, but three - both lower and upper case - are not. These are:
- "a with ogonek";
- "s with accent";
- "z with accent.
It happens with all fonts that should contain iso-8859-2 characters. Here is an example:
I have just tried this on my server and it works OK. I made sure when I wrote the code my editor was in UTF-8 not ANSI as that is its standard setting. I presume your standard font has those characters ?
I seem to remember annotate is better for this sort of thing.
Bonzo wrote:I have just tried this on my server and it works OK. I made sure when I wrote the code my editor was in UTF-8 not ANSI as that is its standard setting.
From what you wrote about encoding I guess you tried this on Windows. I encountered this problem on Linux. The file was written in ISO-8859-2 (Latin 2) encoding as it is specified in "convert" arguments.
I presume your standard font has those characters ?
I didn't use the standard font. I tried all 479 fonts "convert" can see. These fonts can be divieded in two groups:
fonts that do not render correctly any character from my test - they don't contain polish glyphs;
fonts that render correctly all but these three characters from my test - they do contan polish glyphs and other programs - like GIMP - have no problems with them.
This particular font which I used as an example in my original posting (Adelaide-Normal) has all needed glyphs, this is why I shown the same text rendered by GIMP.