Re: [GD-DEVEL] Only default font in app code, while test program runs fine on system

[email protected] (Takeshi Abe) Thu, 23 Sep 2010 08:52:12 +0900 (JST)
Newsgroups php.gd.devel
Message-ID <[email protected]>
Hi Nick,

On Sun, 29 Aug 2010 12:00:30 +0200, Nick Rudnick <[email protected]> wrote:
> I have a strange problem: Running standalone GD library test programs on my
> system, I get beautiful results -- while inside a larger app using the GD
> library, everytime the same (default-?)font (something sans serif) is displayed,
> which does not support Chinese.
> 
> Applying gdFontCacheSetup() inside seemingly did not do the trick... :-(
What does gdFontCacheSetup() return?
If its value is negative, then it failed to create the font cache.

> My guess is that the environment inside the app must be some way different --
> but how??
Do you use libgd 2.0.35 or older version?

> Does anybody know of variables internal or external to the GD library which
> might block choosing fonts?
You can find the variables like "fontCache" in gdft.c of the GD source.

> 
> Has anybody a hint where to begin with debugging?

Cheers,
-- Takeshi Abe