Page 1 of 1

Font handling

Posted: 2017-09-02T05:50:23-07:00
by spaced
I'm wondering if anyone here can shed any light on a problem I'm having.

Certain fonts behave differently when I use them in PS / Illustrator and ImageMagick

For example, RoseWood font: http://www.fontpalace.com/font-details/Rosewood/

In Photoshop (or other applications), all the letters are close together eg:

Image

But when I render it using IM, the 'W' has extra space between itself and the letters adjacent to it eg:

Image

It's not just the W that has problems - letters such as V or Y also have same issue.

Please can anyone tell me if there is any solution to this? Thank you in advance

-------------
I'm using PHP and ImageMagick 6.8.9-9 Q16 x86_64 on Ubuntu 16.04

Re: Font handling

Posted: 2017-09-02T06:57:16-07:00
by magick
We're getting expected results with ImageMagick 6.9.9-10, the current release, and Freetype 2.7.1. There are four paths that can generate artifacts in font rendering: the font metrics, the interpretation of the font metrics with hinting, the release of ImageMagick, and the release of Freetype. In your case, we cannot decipher which of these paths causes less than optimal results for you.

Re: Font handling

Posted: 2017-09-04T02:16:14-07:00
by spaced
Thank you for your reply.

How would I go about investigating which of those 4 are causing the issue?

I tried checking which version of Freetype I have installed but couldn't find that information :/

If it helps, I just ran a test using the latest version of graphicsmagick and got the same issue as with IM - so i'm guessing it's not the IM version?

Re: Font handling

Posted: 2017-09-04T11:30:05-07:00
by fmw42
I suggest you just upgrade ImageMagick and Freetype, then see if the problem exists. You could also download another version of your font from somewhere else to be sure it is not the font.

You have not provided your command, so we do not know what method you used to convert text to an image?

Font metrics on that font are not very good. I ran this command on IM 6.9.9.11 Q16 with Freetype 2.8_0 and got this result.

Code: Select all

convert -size x100 -background white -font /Library/Fonts/Rosewood.ttf label:"HOWARD" howard_69911.jpg
Image

With the same command on IM 6.8.9.9 Q16 Mac OSX, I get just a slightly different image.

Image