Re: Call for testing - large/small fonts

new topic     » goto parent     » topic index » view thread      » older message » newer message

Tested on Windows ME and it works. However there is a potential problem. In
Windows ME one can set a customised scaling factor in which case the return
from the GetDeviceCaps might not be either 120 or 96 and this is not an
error.

-----------
Derek.
----- Original Message -----
From: <petelomax at blueyonder.co.uk>
To: "EUforum" <EUforum at topica.com>
Subject: Call for testing - large/small fonts



On Sun,  3 Feb 2002 10:58:11 +0000, you wrote:

Euman gave me the first three lines below to check for large/small
fonts. It works fine on my PC (win98 only), but before I bury it in my
code I'd like to know it passes muster on 95, 2000, ce, me, xp, nt...
Can a few of you test it on your machines & report back, letting me
know what version of windows you are running, please:

include win32lib.ew

object hdc, iDPI

    hdc = getDC(Screen) --Get DC for screen
    iDPI = w32Func( xGetDeviceCaps, {hdc, LOGPIXELSX} )
    releaseDC(hdc)
if iDPI = 120 then
puts(1,"Large fonts detected")
elsif iDPI = 96 then
puts(1,"Small fonts detected")
else
printf(1,"ERROR: unrecognised font size: %d",iDPI)
end if
    puts(1,"\n\n")
hdc=prompt_string("Press Enter..")

Thanks,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu