Hi!
While trying to solve this, i dive into Source Code. I suddenly notice at magick/annotate.c:861
Code: Select all
if (*draw_info->font == '-')
return(RenderX11(image,draw_info,offset,metrics));
which may means the font name may be '-' or start from '-'. It is good news, because many X11 bitmap font names start with '-'.
I find some suitable fonts with
Code: Select all
xlsfonts | grep 10646 | grep terminus
which give me, for example,
-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
-xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1
...
So i try to feed IM with that font name (without path)
and it surprisingly work! And also good news that 'pointsize' not make sense here, because font height hardly defined in font file, and we do not need scaling:
Code: Select all
convert -font '-xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1' label:"YOURTEXT Ё Й が" output.png
Cool! But bad news is Unicode symbols not supported in IM for X11 rendering, unfortunately.
I test it on various versions include 6.5.7-8 and 6.8.8 (latest).
So i consider this bug solved with two limitations:
- * No unicode;
* Font names not starting with '-' will not work, as i think.
Unfortunately, looking at source code, it is looks like far not easy to add Unicode support for X11 bitmap font render for IM. But if developers suddenly obtain the time to do it, i can help in form preffered by developers, please PM me then.
Thanks!
P.S. For limited support of international glyphs, particularly Cyrillic as i need, there is (ugly) workaround:
Obtain font names with 1-byte Cyrillic encoding, say KOI:
Code: Select all
xlsfonts | grep koi | grep terminus
Then use
Code: Select all
convert -font '-xos4-terminus-medium-r-normal--24-240-72-72-c-120-koi8-r' label:"$(echo 'Проверка работы' | iconv -f utf8 -t koi8-r)" output.png
This is ugly because most other Unicode symbols will be not available due to 1-byte limitation.