Page 1 of 1

pgm_comment_2.pgm

Posted: 2012-01-13T00:28:16-07:00
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?

Re: pgm_comment_2.pgm

Posted: 2012-01-13T06:17:37-07:00
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.