I have a code that puts text on an image...
Now, I need the font to match the one on this page, and Arial appears to be the font, but when I put it on the image, it has a slightly grey shadow or something... Anyone have any ideas of a font that will match that one, or how I can get rid of the "shadow?"
| Code: |
| <?php
// Set the content-type header("Content-type: image/png"); // Create the image $im = imagecreatefrompng('RS Highscores Image.PNG'); // Create some colors $black = imagecolorallocate($im, 0, 0, 0); $grey = imagecolorallocate($im, 128, 128, 128); // The text to draw $text = 'Help me out here!!!'; // Replace path by your own font path $font = 'Fonts/ARIALN.ttf'; $fontbd = 'Fonts/ARIALNB.ttf'; $fonti = 'Fonts/ARIALNI.ttf'; $fontNew = imageloadfont("Fonts/ArialSpecial.gdf"); // Add the text imagettftext($im, 13, 0, 50, 53, $black, $font, $text); //imagestring($im, $fontNew, 50, 53, $text, $black); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?> |
Now, I need the font to match the one on this page, and Arial appears to be the font, but when I put it on the image, it has a slightly grey shadow or something... Anyone have any ideas of a font that will match that one, or how I can get rid of the "shadow?"
