> David Hiltz wrote:
> >
> > > I want to get the width of a textstring using a specified font.
> > >
> > > I tried this:
> > >
> > > $text = "Hello";
> > > $tab_font = new Win32::GUI::Font(-name => "Tahoma", -height => 13, -bold
> > > => 1);
> > > ($w, $h) = $TS->GetTextExtentPoint32($tab_font, $text);
> > >
> > > print"$text: $w x $h\n";
> > >
> > > I get the correct height (13), but i can't get the correct width.
> > >
> > > Who can help me out?
> >
> > Is the width longer than the actual text?
>
> Yes, it's returning the actual width of the string using the system
> font.
> I can't get it to work with an other font then the system font.
I don't even think the size is correct for the system font.