Glyph width error

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
djlspeed
Posts: 5
Joined: 2013-07-08T05:00:49-07:00
Authentication code: 6789

Glyph width error

Post by djlspeed »

I already posted this in the normal user list:
viewtopic.php?f=1&t=23705

I try to overlay two versions of the same text using different fonts (to create text effects like outlines and multi-color letters).
The fonts are defined with identical glyph widths, if I use Photoshop (or any text processing software) to generate the two texts and overlay them, they fit perfectly.
But ImageMagick doesn't seem to care about glyph widths but uses its own positioning system. So the two layers don't fit even if it's only a one-letter-text to be displayed.
What font definitions are used by ImageMagick?

Example:
Image

Command:

Code: Select all

convert -size 5000x500 xc:transparent -antialias -stroke none -pointsize 60 -gravity southwest -fill "#00ff00" -font FontBack.ttf -annotate 0x0+0+0 "123456789012345678901234567890123456789012345678901234567890" -fill "#ff0000" -font FontOverlay.ttf -annotate 0x0+0+0 "123456789012345678901234567890123456789012345678901234567890" -trim -virtual-pixel Background temp.png
Used fonts:
http://www.vielzulangedomain.de/test/im ... ntBack.ttf
http://www.vielzulangedomain.de/test/im ... verlay.ttf

Tested on:
Windows 7 with IM 6.8.6-3
as well as on
Ubuntu 12.04.2 LTS with IM 6.6.9-7

Got exactly the same result.

What do I have to tell my font designer? Which definitions does IM use to position letters?

Thanks for your help.
Post Reply