PHP Classes

Custom font

Recommend this page to a friend!

      Image Processor (CSS)  >  All threads  >  Custom font  >  (Un) Subscribe thread alerts  
Subject:Custom font
Summary:Image Processor (CSS)
Messages:3
Author:Marcin
Date:2010-05-12 21:41:45
Update:2010-08-17 10:10:17
 

  1. Custom font   Reply   Report abuse  
Picture of Marcin Marcin - 2010-05-12 21:41:45
Dear Author!
I'd like to use different font. I downloaded the one I am going to use (RicksAmericanNF.ttf) and try to set it up with FontPath method, but with no success. How should font-family parameter look like? Can you post here an example how to achieve this?

Thank you in advance!

  2. Re: Custom font   Reply   Report abuse  
Picture of Tufan Baris YILDIRIM Tufan Baris YILDIRIM - 2010-05-13 13:46:02 - In reply to message 1 from Marcin
download new version of D3Image.php and use as :

$image=new D3Image("width:500px;height:500px;background:black");
$image->FontPath('FontFolder/');
$image->FontCreate('arialbd.ttf','My Font') ; // arialbd.ttf is file name registered as My Font
$image->Write('Custon Font Example','font-family:My Font;font-size:13px;top:15px;left:10px;color:white'); // used as My Font
$image->Show();

  3. Re: Custom font   Reply   Report abuse  
Picture of Miroslav Zografski Miroslav Zografski - 2010-08-17 10:10:18 - In reply to message 2 from Tufan Baris YILDIRIM
Hello YILDIRIM,

Congrats on your lovely class. I'm really enjoing it. have only one thing to ask: is there a way to permanently assign font files to names instead of each time registering the font?
(this may be a silly question but I'm not profficient in writing PHP).

Regards,

M.Zografski