Page 1 of 1

Problem with font rendering (looks too thin)

Posted: 2010-11-27T10:38:38-07:00
by iGEL
Hi!

I need to generate headline images for a client. On my Mac, everything works fine, but on the server (runs on old version of Debian), the font looks to thin.

This is, what I generated on my Mac:
Image

This is the result of the same command on Linux:
Image
The code to generate the image is:

Code: Select all

convert -size 350x120 -background 'rgba(0,0,0,0)' -font ScalaSan.ttf -gravity SouthWest -pointsize 20 -fill 'rgba(0,0,0,0.7)' caption:"This is the desired image." test.png
On the Mac, I've installed ImageMagick 6.6.2-9 via Macports. On the Debian server, it was installed via apt-get (Version is 6.3.7). I could reproduce the problem on my private Ubuntu server (6.5.7-8) and even compiled 6.6.5-9 from the source, but the result was always the the same. So it's not the version of ImageMagick, but might be a dependent library. The font is also broken, if I generate a non-transparent background.

Any ideas? Please help (as I'm already late with this project)!

Regards, iGEL

Re: Problem with font rendering (looks too thin)

Posted: 2010-11-27T11:38:32-07:00
by fmw42
If the IM versions are not the same, or the fonts are not exactly the same even though you have the same font name, then that could cause a problem. I am not sure if you need to verify the same Ghostscript (probably not as it is for PDF and the like) or Freetype delegates. Someone more knowledgeable about fonts would have to answer.

Re: Problem with font rendering (looks too thin)

Posted: 2010-11-27T12:33:49-07:00
by GreenKoopa
Since you are in a hurry, I'll throw out ideas. Hopefully someone can help you with fonts in particular.

There was a recent post (ImageMagick Perform differently under different os) concerning inconsistencies of a different sort. Maybe some help there?

My first thought is to make the text too large then resize down. This sometimes helps in achieving consistency, but with the wrong resize filter could end up looking awful. Maybe a -stroke would help achieve different results? Removing the text and/or background transparency doesn't help at all?

Re: Problem with font rendering (looks too thin)

Posted: 2010-11-28T18:12:32-07:00
by anthony
The two systems have different delegate libraries (or versions of that library) that IM calls to render text to a raster image using the given font and other settings.

At first look I thought that maybe the second 'undesirable' image was bitmap, and your problem was in output format but the result does appear aliased so that does not seem to be the problem. Becides you also said you get the same result on a non-transparent background.

However as I do not have a copy of ScalaSan.ttf I can't actually try it on my system.
I did a search for it but the only site listing it also reports that it has removed it for "copyright reasons".

Re: Problem with font rendering (looks too thin)

Posted: 2010-11-29T03:03:21-07:00
by iGEL
Hi!

I found a solution. It was the combination of some kind of library on linux and the font, which was converted from another format. I've got the original TTF from the screendesigner and that font works fine.

Thank you for your time!

Regards, iGEL