ImageTTFText can't find/open ttf fonts

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

    ImageTTFText can't find/open ttf fonts

    I'm attempting to use ImageTTFText to render text to an image, I can get
    it to work if I

    a) specify the full font path
    b) switch off anti-aliasing
    c) specify an OpenType font (e.g. arial.ttf)

    If I specify a TrueType font (e.g. futura.ttf) I get an error message
    "Warning: imagettftext(): Could not find/open font in c:\filepath"

    phpinfo() reports:
    PHP Version 4.3.4
    GD Version bundled (2.0.15 compatible)

    also running under apache built from 2.0.47 under Win XP


    In summary: I can get OpenType fonts to render, any advice on how to get
    TrueType fonts working?


    MTIA, if replying by email please use address in sig


    --
    bof at bof dot me dot uk
  • bof

    #2
    Re: ImageTTFText can't find/open ttf fonts

    In message <juTqKhAOWfu$Ew CQ@invalid.doma in>, bof
    <nothingread@ho tmail.com> writes[color=blue]
    >I'm attempting to use ImageTTFText to render text to an image, I can
    >get it to work if I
    >
    >a) specify the full font path
    >b) switch off anti-aliasing
    >c) specify an OpenType font (e.g. arial.ttf)
    >
    >If I specify a TrueType font (e.g. futura.ttf) I get an error message
    >"Warning: imagettftext(): Could not find/open font in c:\filepath"
    >
    >phpinfo() reports:
    >PHP Version 4.3.4
    >GD Version bundled (2.0.15 compatible)
    >
    >also running under apache built from 2.0.47 under Win XP
    >
    >
    >In summary: I can get OpenType fonts to render, any advice on how to
    >get TrueType fonts working?[/color]


    Finally resolved this by using the DOS path name to the font and all now
    appears OK; it must have just been chance that the fonts I chose to test
    on that worked happened to have a path name that was the same in Windows
    and DOS

    --
    bof at bof dot me dot uk

    Comment

    Working...