[php-maint] Bug#334746: php4-gd: Unable to use truetype fonts (workaround provided)

J.L. Fernandez Jambrina j.fdez.jambrina at gr.ssr.upm.es
Wed Oct 19 16:59:57 UTC 2005

Package: php4-gd
Version: 4:4.3.10-16
Severity: normal

when using both, imagettfbbox and imagettftext, I get the following
text messages instead of the image:

Warning: imagettfbbox(): Could not find/open font in
/home/jose/public_html/gen3/lib/xygraph_inc.php on line 83

Warning: imagettftext(): Could not find/open font in
/home/jose/public_html/gen3/lib/xygraph_inc.php on line 88

I't seems that php4-gd search for fonts in the directory 
while the truetype fonts are installed in subdirectories:

  The package msttcorefonts install it's fonts in 

 Other fonts appear in:
 copy the fonts to the  /usr/share/fonts/truetype directory:

 	cd  /usr/share/fonts/truetype
 	cp  msttcorefonts/* .

 Yours, Jose

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages php4-gd depends on:
ii  debconf [debconf-2             Debian configuration management sy
ii  libapache-mod-php4 4:4.3.10-16           server-side, HTML-embedded scripti
ii  libc6              2.3.2.ds1-22          GNU C Library: Shared libraries an
ii  libfreetype6       2.1.7-2.4             FreeType 2 font engine, shared lib
ii  libgd2-xpm         2.0.33-1.1            GD Graphics Library version 2
ii  libjpeg62          6b-10                 The Independent JPEG Group's JPEG 
ii  libpng12-0         1.2.8rel-1            PNG library - runtime
ii  libt1-5            5.0.2-3               Type 1 font rasterizer library - r
ii  libx11-6           4.3.0.dfsg.1-14sarge1 X Window System protocol client li
ii  libxpm4            4.3.0.dfsg.1-14sarge1 X pixmap library
ii  php4-cgi [phpapi-2 4:4.3.10-16           server-side, HTML-embedded scripti
ii  php4-cli [phpapi-2 4:4.3.10-16           command-line interpreter for the p
ii  php4-common        4:4.3.10-16           Common files for packages built fr
ii  xlibs              4.3.0.dfsg.1-14sarge1 X Keyboard Extension (XKB) configu
ii  zlib1g             1:1.2.2-4.sarge.2     compression library - runtime

-- debconf information:
  php4/extension_gd_cli: true
  php4/extension_gd_apache: true
  php4/add_extension: true
  php4/remove_extension: true
  php4/extension_gd_cgi: true

More information about the pkg-php-maint mailing list