Hi, see Font question regarding GD.pm

Your PhP script had no use of True Type Fonts, so just because it ran, dosn't mean your GD libs are up to doing TrueType.

Your problem is just setting up your True Type fonts correctly.

It is a well known problem that GD requires full path names to the ttf file. Just specifying 'arial' won't do. Also read "perldoc GD" and look for the section "Character and String Drawing", wherein it says

$font = GD::Font->load($fontfilepath) This method dynamically loads a font file, returning a font + that you can use in subsequent calls to drawing methods. For example: my $courier = GD::Font->load('./courierR12.fnt') or die +"Can't load font"; $image->string($courier,2,10,"Peachy Keen",$peach);
Even in the docs, the ./courierR12.fnt file is in the scripts working directory. Try copying your arial font file to the CWD of the script. There is also mention of using stringFT for TrueType fonts, google for examples if you need them.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re^2: GD::Graph Problems: Missing "built-in" font & AUTOLOAD deprecation by zentara
in thread GD::Graph Problems: Missing "built-in" font & AUTOLOAD deprecation by kurta

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.