Capitals with diacritics are not rendered

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Tjark

Capitals with diacritics are not rendered

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Capitals with diacritics are not rendered

Post 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.
Tjark

Re: Capitals with diacritics are not rendered

Post 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....
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Capitals with diacritics are not rendered

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Tjark

Re: Capitals with diacritics are not rendered

Post 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!
Post Reply