(none) imager-devel
/ help / lists / applications / search /
 

Re: [imager-devel]

From: Tony Cook (
13825@xyz.molar.is)
Date: Thu 14 Apr 2005 - 01:02:31 GMT


On Wed, Apr 13, 2005 at 04:27:32PM -0500, Miller, Scott L (Omaha Networks) wrote:
> Hi all,
>
> Ok, I've been playing with imager for 2+ weeks now, and am just starting
> to try to actually work the project I want to use it on.
>
> So, my only question so far is, how does one go about making a font bold?
> Or Italicized, etc...
>
> (on linux, v 0.44, using a win2k font - times new roman)
>

You need to use the bold or italic version of the font.

For example, there are 4 Times New Roman font files:

  times.ttf Non-italic, normal weight
  timesi.ttf Italic, normal weight
  timesbd.ttf Non-italic, bold weight
  timesbi.ttf Italic, bold weight

To produce bold output you'd do:

  my $font = Imager::Font->new(file=>"path/to/fonts/timesbd.ttf");

Tony