GD/Freetype text problems with bold or size < 8 - Followup

From: Date: Thu, 22 Dec 2005 09:50:22 +0000
Subject: GD/Freetype text problems with bold or size < 8 - Followup
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-227799@lists.php.net to get a copy of this message
Just to followup on this, I was able to install PHP 5.1.1 with its embedded GD library, and it turns out that GD is definitely the cause of the issues. So my question now is what changes to the source can be made to ensure the highest-quality fonts in smaller sizes? As I've said, I've been on hosts with very smooth rendering of smaller text (size < 8, assuming 96 pixel resolution), but my current build looks horrible. http://card.mygamercard.net/mini/Morgon.jpg is what it looks like now - all text is 6 point aside from the bold text at the top, which is 8. This is the 5.0.4 install. http://data.mygamercard.net/test.png is an image I created using a built-but-not-installed version of PHP 5.1.1. I changed the GD_RESOLUTION to 72 point font, so to compensate, these are a font size of 9. What I would like is for the fonts to look similar to what would really be displayed, had this been standard system fonts in a browser or other application. If anyone has had experience with rendering text, I would really appreciate some hints on how to tweak GD to make things look proper. Thanks Jason Young wrote:
Currently, I'm running PHP 5.0.4 (only because it's the only one I can get to work on my FC4 x64 install!), but for some reason, using pixel sizes under 8, or using bold fonts, makes the text look horrible. My old host (1&1 in case anyone else has them..) had this working well, but I have no idea what their settings were. I've heard that editing the gd.h file to change the resolution from 96 to 72 helps, but I'm assuming I'd have to recompile something for that to take effect, and I can't find a PHP-GD Source RPM for my arch. What must I do to get everything smooth again? Fedora Core 4, x64 PHP 5.0.4 PHP-GD module (separate RPM install) Freetype 2.1 gd-2.0.33 Thank you.


« previous php.general (#227799) next »