Jump to content


Photo

Wanna Use True Type Fonts


  • Please log in to reply
1 reply to this topic

#1 venu_31

venu_31
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 27 June 2006 - 08:40 PM

HI All,
i m trying to write text on image using the function imagettftext();, after uploading the file i dont see any text on the image.
my code:

$font=imageloadfont("..extras/Fonts/timesbi.ttf");

imagettftext ( $desImage,7,0,42,290,$white,$font,$mtkTxt);

i have all the fonts(ttf fonts) copied the sytem fonts on the server in fonts folder.
i even tried with the just specifying the fonts link like below

$font="..extras/Fonts/timesbi.ttf"

imagettftext ( $desImage,7,0,42,290,$white,$font,$mtkTxt);
-----------
my server details:
php version :4.3.2
mysql:3.23
gd library:2.0.12 bundled

Bottam line: i wanna use smooth font on the image instead of gdf fonts.


#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 27 June 2006 - 09:44 PM

Path definition is wrong
$font="../extras/Fonts/timesbi.ttf";

imagettftext ( $desImage,7,0,42,290,$white,$font,$mtkTxt);

If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users