PHP/GD and TrueType Fonts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jamie Davison

    PHP/GD and TrueType Fonts

    I'm have GD 2.0.1 - php 4.3.5 compiled

    --with-gd--enable-gd-native-ttf--enable-gd-jis-conv
    --with-freetype-dir=/usr/local' '--with-t1lib=/usr/local
    --with-jpeg-dir=/usr/local--with-png-dir=/usr/local'
    --with-xpm-dir=/usr/X11R6'


    running under FreeBSD 4.8.


    GD's working properly as I'm able to generate graph images and resample
    pre-existing images however I'm trying to render images with dynamic text
    but have the feeling that the server simply doesn't have the TrueType fonts
    installed.

    Does anyone know how to install these fonts and if so, where would the
    default font directory be located?

    Thanks in advance,

    -Jamie

  • ljb

    #2
    Re: PHP/GD and TrueType Fonts

    donotsend@yahoo .com wrote:[color=blue]
    > I'm have GD 2.0.1 - php 4.3.5 compiled
    >...
    > GD's working properly as I'm able to generate graph images and resample
    > pre-existing images however I'm trying to render images with dynamic text
    > but have the feeling that the server simply doesn't have the TrueType fonts
    > installed.
    >
    > Does anyone know how to install these fonts and if so, where would the
    > default font directory be located?[/color]

    I suggest you use a full path in your scripts to reference the TrueType
    fonts, which you can install anywhere you like. Don't rely on PHP and GD
    looking for the fonts in a special directory. There does seem to be a
    default search path, and an environment variable GDFONTPATH which overrides
    it, but that fact that neither of these seems to be documented would make
    me hesitate to rely on them.

    Comment

    Working...