pgm_comment_2.pgm

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

pgm_comment_2.pgm

Post by anthony »

Something strange with TEXT rengering..

For years I have been converting text output in IM Examples to a GIF file format so that the output can be displayed simply on the IM Example Web pages. For example...

Code: Select all

convert -size 2x2 xc:grey +depth -compress none PGM:-
Produces the image GIF
Image
using the script "txt2gif which basically uses at its core...

Code: Select all

  cat "output_file.txt" | convert  -font CourierNew -pointsize 12 label:@-  "output_file.txt.gif"
Their are a few other things (background border) but that does not effect the font rendering.

However recently I upgraded my machine from Fedora 14 to Fedora 16 and the GIF image being generated looks like this which is rather horrible looking!
Image

The same code, IM version, and Font file is being used (verified). IM was compiled on both machine from the same source using the same configuration. The only change is only the OS version has changed.

The CourierNew font is a standard TTF font (monospaced) and one I have been using a VERY long time. Their has been minor changes in the way the font was rendered (slight pixel intensity or single pixel moves o the text in the image) but nothing like this horrid change.

So does anyone know what changed between Fedora 14 and 16 to cause such a horrible change in the font rendering?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: pgm_comment_2.pgm

Post by magick »

Its a problem with the Freetype library. For one, subpixel rendering is turned off due to patents. You can enable it, see http://blog.andreas-haerter.com/2011/07 ... harp-fonts. When you reboot, ImageMagick will use subpixel rendering. This still does not give the same quality as we're seeing with older versions of Fedora but we have a patch for that. Look for it in ImageMagick 6.7.4-7 Beta by sometime tomorrow.
Post Reply