Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#26 GetMetrics() always returns the default system font

open
nobody
3
2008-01-31
2004-08-04
Anonymous
No

Win32::GUI::Font::GetMetrics() seems to be always
returning the default system font for a window created
with any custom font size.

This bug refers to the 0.0.671 version of Win32::GUI
(march 2004), although I know there have been updates
in the CVS, because it might be that not only the .pm-s
are involved and I can't recompile the DLLs.

I have attached a test file.

By the way, any chance of a new build?

Hope this helps,
Dan Dascalescu

--
I Do Not Yahoo!!
Get rid of ads and banners in e-mail with Proxmail!
http://proxmail.notlong.com

Discussion

  • Test file for GetMetrics() returning the default system font for a window created with a custom font size

     
    Attachments
  • Robert May
    Robert May
    2005-08-04

    • assigned_to: nobody --> robertemay
     
  • Robert May
    Robert May
    2005-10-04

    Logged In: YES
    user_id=674651

    I wrote some tests for this, intending to get them to pass
    while fixing the problem. It turns out that it does
    actually return different values for different sizes of font
    - it's just that the values are in 'logical' units and not
    pixels. For now, use the Info() method if you want the
    height in pixels (untested, but that's what the code looks
    like) - I need to think further (and understand a bit more
    about fonts and their uses) before I can make a call as to
    whether it would be right for this method to return the
    height in pixels too. Rob.

     
  • Robert May
    Robert May
    2005-10-04

    • priority: 5 --> 3
     
  • Robert May
    Robert May
    2006-10-26

    • assigned_to: robertemay --> nobody
     
  • Robert May
    Robert May
    2008-01-31

    • labels: --> Win32::GUI Core