SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question GD Libary Font Paths......

    Hi Everyone at Sitepoint...

    I'm trying to implement a security image with text written over a small image. It worked fine locally but now thta I've come to put it on my live server the script can't find the font file to write the text using the imagettftext() function.

    Is there any good way of finding the path for the fonts. My Hosts aren't very helpful in helping with this sort of thing so I can't really ask them.

    I know what variable to reset but I can't get it out/or reset it. I've looked on phpinfo and I'm runnin 2.0.28 and truetype is enabled.

    Any assistance would be greatly appreciated

    Neo

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,398
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    With GD unlike ImageMagick you can use your own font and so create your own path.

    I just put the font in the same folder as the code and call it in the code like Arial.ttf

    From memory you need True type installed ? and the font should be a "True type" font.

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doh how stupid do I feel :P

    Thanks a bunch its wroking now!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •