John Whitney wrote: > Hello: > > My Win32::GUI app has text in the window, and when run on Windows 7, versus > 98 or XP, the size of the text in pixels changes. Is there a way to keep > the text size consistant, pixel wise, across the different operating > systems? Here is an image showing how it differs, Windows 7 vs Win98.. >
Your only hope is to have the DPI set correctly for each monitor and use that value to set the character size in point, not pixels. But starting in Win7, and HTML5, because programmers used pixels all the time rather than points, the HTML5 designers redefined a pixel to be exactly 1/100th of an inch. To get at real hardware values you have to look at some other setting in a browser. Win7 has both types of magnification -- one that is XP compat which changes the DPI number (which most apps ignored), and another which changes the size of the pixel (which works for all apps, but may cause other problems -- like the app not fitting on the screen or such. Providing your Win7 isn't using global magnification -- you might try getting at the DPI value... I grab it in a BASH script on windows with dpi=$(regtool -d get '/HKLM/Software/Microsoft/Windows NT/CurrentVersion/FontDPI/LogPixels') # check for insane values ((dpi<50||dpi>>400)) && dpi=96 echo "$dpi" (I also added some sanity checking in case the number was really weird. Another thing -- that looks different between the two -- one looks like it has LCD font smoothing turned on, (Cleartype), the XP version looks like it might be using anti aliasing, or maybe not even that.... I don't know where you can poke at those settings programatically... Linda ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/