arial.ttf
Heej,
Ik wil graag de functie imagettftext() gebruiken, hier heb ik een fontfile voor nodig.
Heeft iemand een arial.ttf voor me? Ik vind hem niet via google.
Ik wil graag de functie imagettftext() gebruiken, hier heb ik een fontfile voor nodig.
Heeft iemand een arial.ttf voor me? Ik vind hem niet via google.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
header("Content-type: image/png");
$im = @imagecreate(50, 100)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 200, 200, 200);
$text_color = imagecolorallocate($im, 0, 0, 0);
// The text to draw
$text = 'Testing...';
// Replace path by your own font path
$font = 'arial.ttf';
imagettftext($im, 20, 0, 5, 5, $text_color, $font, "♠");
imagepng($im);
imagedestroy($im);
?>
header("Content-type: image/png");
$im = @imagecreate(50, 100)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 200, 200, 200);
$text_color = imagecolorallocate($im, 0, 0, 0);
// The text to draw
$text = 'Testing...';
// Replace path by your own font path
$font = 'arial.ttf';
imagettftext($im, 20, 0, 5, 5, $text_color, $font, "♠");
imagepng($im);
imagedestroy($im);
?>
Gesponsorde koppelingen:
Staat deze niet gewoon in je Windows/Fonts map?
Edit:
Of gebruik een font die je wél kunt vinden of al tot je beschikking hebt. Verander dit dan ook even in het script.
Gewijzigd op 14/05/2010 16:35:44 door Remco Leuven
Ja bedankt, nu zie ik het ook. Staat hij ook al standaard op een server of niet?
Lijkt mij van niet. Maar je kunt hem gewoon direct vanuit je Fonts folder uploaden naar je server. Staat ie gelijk in de goede map.
Bedankt, het is gelukt ;)



