Re: [PHP] Problem loading fonts in gd()

From: Jason Wong (php-general_at_gremlins.biz)
Date: 11/29/03


To: php-general@lists.php.net
Date: Sun, 30 Nov 2003 02:49:21 +0800

On Saturday 29 November 2003 23:15, Eric wrote:

> I have a small problem about loading fonts with imageloadfont()
>
> I have copyed fonts with the extension .fon or .ttf to the same directory
> as my script, and i give them the font as an argument:
>
> $font = imageloadfont('arial.ttf');
>
> But i just keep getting the message:
> Warning: imageloadfont(): Error reading font in c:\program files\apache
> group\apache\htdocs\gd_test.php on line 35
>
> Does anyone know how to properly load fonts into gd, without getting this
> error message?

Try using the full, absolute path to the font.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
There is no such thing as the "right feed
		-- Murphy's Horse Laws n18
*/


Relevant Pages

  • Re: "The parameter is incorrect" error, adding table in Database Explorer
    ... The other day I downloaded the consolas font to check it out, ... table" to my dataset and got back an error message of "Invalid Parameter" ... I can add tables programmatically to the database, ... The SQL Server Express install is on the local machine with all the ...
    (microsoft.public.vsnet.general)
  • Re: Samll Fonts Not Installed
    ... error message when I try to save it. ... find the font and change it, ... attach the file and send to steve at-sign pptools dot com ... Steve Rindsberg, PPT MVP ...
    (microsoft.public.powerpoint)
  • Re: Powerpoint found an error it cant correct when trying to change f
    ... > I am running Office 97 with Win XP SP2. ... When I select the type of font I receive the error message. ... > with WinXP and Office97. ...
    (microsoft.public.powerpoint)
  • elpoint - anybody?
    ... I wanted to try out elpoint, ... didn't install the font successfully. ... But the error message continued. ...
    (Debian-User)
  • Font problems (ISO8859) after upgrading
    ... Unable to load any usable ISO8859 font ... I have been able to find a partial workaround for Emacs by specifying ... * Adobes Acroread (crashes immediately with error message), ...
    (Debian-User)