"Beau E. Cox" on wrote...
| On 8/13/07, Eric Adum <[EMAIL PROTECTED]> wrote:
| > Hi,
| >
| > I recently installed ImageMagick 6.3.5 and the corresponding PerlMagick
| > (from source); however, now when I call the QueryFontMetrics method, it
| > returns undef.
| >
| > When I call QueryFont(), I get a list of fonts, so I know that ImageMagick
| > can see the font I'm trying to use.
| > ...
|
| Hi - you need an actual image ( not just the Image::Magick base ) for
| QueryFontMetrics; this works:
|
| #! /usr/bin/perl
| use strict;
| use warnings FATAL => 'all';
| use Image::Magick;
| use Data::Dumper;
| my $img = Image::Magick->new();
| my @fonts = $img->QueryFont();
| $img->Set( size => "100x100" );
| $img->Read( "Xc:white" );
| foreach my $font ( @fonts ) {
| print Dumper( [ $img->QueryFontMetrics( text => 'Testing 1 2 3', font =>
| $font ) ] );
| }
|
What about the 'density' or resolution setting needed?
Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
In fact, the mere act of opening the box will determine the state of
the cat, although in this case there were three determinate states
the cat could be in: these being Alive, Dead, and Bloody Furious.
-- Schrodinger's Moggy -- Terry Pratchett, "Lords and Ladies"
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users