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

RE: One last font question

From: Dan Muey (
Date: Wed 04 Jun 2003 - 14:24:55 GMT

> On Tue, Jun 03, 2003 at 04:49:53PM -0500, Dan Muey wrote:
> > I swear after I get these then I'll leave you all alone! ;p
> >
> > 1) If I am able to use Truetype fonts ok with Imager then
> does it work
> > to simply upload new .ttf file and put the path to those in
> the script
> > or do you have to install new .ttf Files somehow to
> incorporate them
> > into imager?
> If you're not using the win32 driver, put the files anywhere,
> and supply the full path (or a relative path) to the font file.
> If you want to use the win32 driver (only under Win32,
> including cygwin), install the font as a Windows font, and
> supply the face name of the font.
> > 2) When Imager::Font guesses the font type based on file extension:
> > .ttf files are Truetype .pbf files are t1 postscript
> > 2.a)
> > .??? Files are Freetype2
> > 2.b)
> > .??? Files are Win32 fonts
> > 2.c)
> > can you even use win32 files on a *nix server?, assuming
> you have gdi32.lib|libgdi32.a and windows.h on your server of course
> You can only use the Win32 driver under Win32 - and the Win32
> driver just uses the installed Win32 fonts, you supply a face
> name, not a filename.
> As to which driver is used, that's a bit more complex.
> By default, a .ttf file is handled by Freetype 1.x, a .pfb
> file by TTLib, and a variety of fonts is handled by Freetype
> 2.x, in that order. Freetype 2.x can handle all of the fonts
> that the other two can handle.
> You can use the priority() method to change the order. The
> FT1.x caches the glyphs, so it should be a little faster, but
> FT2.x renders a little more nicely. Some features, like
> transformations, are only available in FT2.x.
> You can override which driver you use by creating the font
> with the "type" parameter:
> my $font = Imager::Font->new(file => $filename, type=>'ft2');

Excellent! Thanks Tony!
I'll read up on freetype2 at their website so I'll have a better understanding
about how these crazy fonts work!!
I appreciate the help , Imager Rocks!!!!!!!

> Tony