Page 1 of 1

Capitals with diacritics are not rendered

Posted: 2009-07-09T01:33:42-07:00
by Tjark
I tried to render a text which has capitals with diacritics on them, like ÄÖÏ. The diacritics didn't get rendered. For non capitals, it works, see my example below. I tried different fonts, both fonts have the capitals with diacritics in them.

Image

Code: Select all

/usr/bin/convert -fill '#ff0000'  -pointsize 40 label:'èîï ÄÖÏ' imagemagicktest.gif

Re: Capitals with diacritics are not rendered

Posted: 2009-07-09T09:22:13-07:00
by magick
What version of ImageMagick / Freetype are you using? We're using ImageMagick 6.5.4-2 with Freetype 2.3.9 and the text was rendered correctly.

Re: Capitals with diacritics are not rendered

Posted: 2009-07-09T09:29:34-07:00
by Tjark
I'm currently using:

ImageMagick 6.3.7 02/19/08 Q16
Freetype 2.3.5

and

ImageMagick 6.4.0 07/27/08 Q16
Freetype 2.3.7


On the first server, that is the version installed by apt-get in Ubuntu.
I'm now building 6.5.4.2 manually. I'll let you know what the result is.

not a good result so far: it's now completely ignoring special characters. A normal tekst goes fine, but even a é gets ignored.

Maybe I need to upgrade freetype also?

--edit--

I tried freetype 2.3.9, but still I don't get any characters with diacritics.... :(
Normal text is fine though....

tried some other stuff, but still nothing.
Freetype-config shows:

Code: Select all

freetype-config --ftversion
2.3.9
When I'm using the imagemagick from apt-get ( 6.3.7 ) then I get the image as in the first posting.
When I remove that imagemagick and manually compile the latest version (or dont remove and install over it), I don't get to see any characters with diacritics...

I don't know what I can do next....

Re: Capitals with diacritics are not rendered

Posted: 2009-07-17T03:55:22-07:00
by anthony
Tjark wrote:I tried to render a text which has capitals with diacritics on them, like ÄÖÏ. The diacritics didn't get rendered. For non capitals, it works, see my example below. I tried different fonts, both fonts have the capitals with diacritics in them.

Image

Code: Select all

/usr/bin/convert -fill '#ff0000'  -pointsize 40 label:'èîï ÄÖÏ' imagemagicktest.gif
It works for me!

Hmmm... May be the diacritics are being draw OUTSIDE the normal drawing bounds of the font!
that is the font is not obeying normal font drawing rules.
See http://www.imagemagick.org/Usage/text/#bounds

You can test this with -annotate onto a larger image
http://www.imagemagick.org/Usage/text/#annotate
OR by adding a blank line above the string EG:

Code: Select all

   printf '\nÄÖÏ" | convert -fill '#ff0000'  -pointsize 40 label:@-  imagemagicktest.gif
And please let us know what you get!

If this works, then it is a bug in the font definition itself. Such bugs have been seen before, such as with the "LokiCola" font, though this was for left and right bounds, and not top bound clipping as you are seeing here.

Re: Capitals with diacritics are not rendered

Posted: 2009-07-17T04:16:57-07:00
by Tjark
You're right! I've tested it with the default font and the font I wanted to use, and indeed, it renders the diacritics...

So maybe as a solution, I'll have to add a newline before the rendered font and trim the north side ( just a -trim +repage does the trick)

Thank you very much!