1. 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     » topic index » view message » categorize

2. Re: Call for testing - large/small fonts

On 03.02.02 at 15:41 petelomax at blueyonder.co.uk wrote:
>Can a few of you test it on your machines & report back, letting me
>know what version of windows you are running, please:

Works fine on NT4 (SP6a), returning "large fonts", which is correct.

Marcus

new topic     » goto parent     » topic index » view message » categorize

3. Re: Call for testing - large/small fonts

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 message » categorize

4. Re: Call for testing - large/small fonts

Works fine in XP Pro. Returned "Small fonts deected" which is correct.


>From: petelomax at blueyonder.co.uk
>Reply-To: EUforum at topica.com
>To: EUforum <EUforum at topica.com>
>Subject: Call for testing - large/small fonts
>Date: Sun, 03 Feb 2002 15:41:14 +0000
>
>
>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 message » categorize

5. Re: Call for testing - large/small fonts

>Works fine in XP Pro. Returned "Small fonts deected" which is correct.
Err, detected--------------------------------^
I mean





>>From: petelomax at blueyonder.co.uk
>>Reply-To: EUforum at topica.com
>>To: EUforum <EUforum at topica.com>
>>Subject: Call for testing - large/small fonts
>>Date: Sun, 03 Feb 2002 15:41:14 +0000
>>
>>
>>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 message » categorize

6. Re: Call for testing - large/small fonts

Pete,

On Win98 1st ed, returns "large fonts detected", which is correct.

Dan Moyer

----- 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 message » categorize

7. Re: Call for testing - large/small fonts

Pete,
maybe the code should be more like ...

 ---------------
 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
 puts(1,"Tiny fonts detected")
 end if
     puts(1,"\n\n")
 hdc=prompt_string("Press Enter..")
 -------------------------

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu