server can"t find fonts

server can"t find fonts

am 12.10.2007 09:57:16 von jimbo

I am using imagettftext and imagefttext on my machine locally and
having no problems. BUT my server can't find the fonts. I am feeding
both functions the bare fontfile name with no extensions. My
understanding of the docs ;>) is that php will handle this
transparently from v5.?
I'm not sure in the case of ttf but the documentation is very explicit
with freetype. The interpreter or whatever will add the extension and
search on a predefined path. In any case both funtions work locally
and neither work on my site.

My configuration.
WinXP
Xerver 4.20
PHP 5.0.4
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9

Server configuration
Linux
PHP 4.4.7
Apache version 1.3.37 (Unix)
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype

Does PHP 4.4.7 support freetype properly. It seems to have been
compiled/linked. The main difference in the output seems to be lack of
free type version. Is it possible they just don't have it installed?
Can someone spot the problem or suggest how to solve it. TIA
Jim

Re: server can"t find fonts

am 14.10.2007 01:17:18 von luiheidsgoeroe

On Fri, 12 Oct 2007 09:57:16 +0200, wrote:

> I am using imagettftext and imagefttext on my machine locally and
> having no problems. BUT my server can't find the fonts. I am feeding
> both functions the bare fontfile name with no extensions. My
> understanding of the docs ;>) is that php will handle this
> transparently from v5.?

The docs say:
[quote]
Depending on which version of the GD library PHP is using, when fontfile
does not begin with a leading / then .ttf will be appended to the filename
and the library will attempt to search for that filename along a
library-defined font path.
[/quote]

> I'm not sure in the case of ttf but the documentation is very explicit
> with freetype. The interpreter or whatever will add the extension and
> search on a predefined path. In any case both funtions work locally
> and neither work on my site.

So, what is the defined path for fontfiles your GD library on the server
is using, and is the font there?

(BTW: I usually don't bother with that, I just include the fontfile
somewhere handy in the sourcetree and include it by full path, saves a lot
of hassle).
--
Rik Wasmus