Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I cannot change font or size for labels etc.
For example from GD::Graph sample95.pl (modified)
(It is included in the build directory of the distribution.)
my $font_spec = "Dustismo_Sans"; $my_graph->set_y_label_font($font_spec, 12); $my_graph->set_x_label_font($font_spec, 12); $my_graph->set_y_axis_font($font_spec, 10); $my_graph->set_x_axis_font($font_spec, 36); $my_graph->set_title_font($font_spec, 48); $my_graph->set_legend_font($font_spec, 8); $my_graph->set_values_font($font_spec, 8);
Dustismo_Sans.ttf is in pwd. And I have tried "Dustismo_Sans" and "Dustismo_Sans.ttf" and "/home/john/Dustismo_Sans.ttf" for $font_spec

Whatever I put in $font_spec or in the size field, the appearance of the resulting image is always the same!

Questions:

1. I assume that GD would look for the font file given a relative (to pwd) file name or an absolute file name. Correct?

2. Why can I not change size or font?

3. My OS is FC 8. I loaded msttcorefonts-2.0-1.spec, Microsoft TTL fonts, and they are usable by OpenOffice but I cannot locate corresponding .ttf files. Do they exist as such and if so, where are they?

Thanks

uname -a Linux scan 2.6.26.8-57.fc8 #1 SMP Thu Dec 18 19:19:45 EST 2008 i686 i6 +86 i386 This is perl, v5.8.8 built for i386-linux-thread-multi GD-2.45 GDGraph-1.44 GDTextUtil-0.86

In reply to GD::Graph cannot change font by kp2a

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (8)
    As of 2014-07-28 10:53 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (196 votes), past polls