I have read various posts about how large and small fonts affect
Fox2 apps. How does it apply to VFP? I think I have a case of it.

The symptoms: On one system, text is truncated in labels and
command button captions. The form is the correct size, but the fonts
are too big.

How do I find out which font type is in use and the appropriate
scaling factor?

Sincerely,

Gene Wirchenko

Re: VFP 6: Large and Small Fonts by Rick

Rick
Fri Jan 07 13:50:38 CST 2005

Gene,
This is usually due to using non-standard fonts. When Windows is asked =
to display a font that isn't installed on that system, "it picks a =
similar one". How Windows determines what's similar to one that it =
doesn't have is undocumented as far as I can find!

Rick

"Gene Wirchenko >" <Gene Wirchenko <genew@ucantrade.com.NOTHERE> wrote =
in message news:asjtt01rgpsn02vmm9u3b35p2eek1gi10i@4ax.com...
> I have read various posts about how large and small fonts affect
> Fox2 apps. How does it apply to VFP? I think I have a case of it.
>=20
> The symptoms: On one system, text is truncated in labels and
> command button captions. The form is the correct size, but the fonts
> are too big.
>=20
> How do I find out which font type is in use and the appropriate
> scaling factor?
>=20
> Sincerely,
>=20
> Gene Wirchenko
>

Re: VFP 6: Large and Small Fonts by Cy

Cy
Fri Jan 07 16:45:39 CST 2005

Rick Bean wrote:
> Gene,
> This is usually due to using non-standard fonts. When Windows is asked to display a font that isn't installed on that system, "it picks a similar one". How Windows determines what's similar to one that it doesn't have is undocumented as far as I can find!
>
> Rick
>
> "Gene Wirchenko >" <Gene Wirchenko <genew@ucantrade.com.NOTHERE> wrote in message news:asjtt01rgpsn02vmm9u3b35p2eek1gi10i@4ax.com...
>
>> I have read various posts about how large and small fonts affect
>>Fox2 apps. How does it apply to VFP? I think I have a case of it.
>>
>> The symptoms: On one system, text is truncated in labels and
>>command button captions. The form is the correct size, but the fonts
>>are too big.
>>
>> How do I find out which font type is in use and the appropriate
>>scaling factor?
>>
>>Sincerely,
>>
>>Gene Wirchenko
>>
Also using a bitmap font may cause a problem like that. I found that
for me the cure is to use Arial for the font unless I need monospace in
which case I use courier new. That way the size always stays the same,
of course then you run into a problem with some of the new high res
displays.

--
Cy Welch
Senior Programmer
MetSYS Inc
http://www.metsysinc.com

Re: VFP 6: Large and Small Fonts by Gene

Gene
Fri Jan 07 17:09:47 CST 2005

[reordered to chronological]

On Fri, 7 Jan 2005 14:50:38 -0500, "Rick Bean"
<rgbean@unrealmelange-inc.com> wrote:

>"Gene Wirchenko >" <Gene Wirchenko <genew@ucantrade.com.NOTHERE> wrote in message news:asjtt01rgpsn02vmm9u3b35p2eek1gi10i@4ax.com...
>> I have read various posts about how large and small fonts affect
>> Fox2 apps. How does it apply to VFP? I think I have a case of it.
>>
>> The symptoms: On one system, text is truncated in labels and
>> command button captions. The form is the correct size, but the fonts
>> are too big.
>>
>> How do I find out which font type is in use and the appropriate
>> scaling factor?

>This is usually due to using non-standard fonts. When Windows is asked
to display a font that isn't installed on that system, "it picks a
similar one". How Windows determines what's similar to one that it
doesn't have is undocumented as far as I can find!

That sounded like it might be it, but it was not. The font in
question is Courier New. That is on the trouble system.

It turns out to be in Display Properties - Settings - Advanced...
- General - Display - Font size:. You can set Small fonts or large
fonts (125% of normal). Questions arise:

1) How do I programmatically detect which font size is in use?

2) Other things are affected by this setting, so I want to know how
and what to scale so that my displays work on either font size.

Sincerely,

Gene Wirchenko


Re: VFP 6: Large and Small Fonts by Fernando

Fernando
Fri Jan 07 18:25:56 CST 2005

May be you can check SYSMETRIC(9), that changes the value when you change
Windows Themes (Normal, Large, Extra Large)
In my system (Win2K spanish + VFP 6) changes from 19 to 26 pixels.
Also check other SYSMETRIC's values.

Regards,

Fernando D. Bozzo


"Gene Wirchenko" <genew@ucantrade.com.NOTHERE> escribió en el mensaje
news:2i5ut0da7tr3t2uekmlcrsr0g3797eau1j@4ax.com...
> [reordered to chronological]
>
> On Fri, 7 Jan 2005 14:50:38 -0500, "Rick Bean"
> <rgbean@unrealmelange-inc.com> wrote:
>
> >"Gene Wirchenko >" <Gene Wirchenko <genew@ucantrade.com.NOTHERE> wrote in
message news:asjtt01rgpsn02vmm9u3b35p2eek1gi10i@4ax.com...
> >> I have read various posts about how large and small fonts affect
> >> Fox2 apps. How does it apply to VFP? I think I have a case of it.
> >>
> >> The symptoms: On one system, text is truncated in labels and
> >> command button captions. The form is the correct size, but the fonts
> >> are too big.
> >>
> >> How do I find out which font type is in use and the appropriate
> >> scaling factor?
>
> >This is usually due to using non-standard fonts. When Windows is asked
> to display a font that isn't installed on that system, "it picks a
> similar one". How Windows determines what's similar to one that it
> doesn't have is undocumented as far as I can find!
>
> That sounded like it might be it, but it was not. The font in
> question is Courier New. That is on the trouble system.
>
> It turns out to be in Display Properties - Settings - Advanced...
> - General - Display - Font size:. You can set Small fonts or large
> fonts (125% of normal). Questions arise:
>
> 1) How do I programmatically detect which font size is in use?
>
> 2) Other things are affected by this setting, so I want to know how
> and what to scale so that my displays work on either font size.
>
> Sincerely,
>
> Gene Wirchenko
>



Re: VFP 6: Large and Small Fonts by Rick

Rick
Fri Jan 07 18:48:32 CST 2005

Gene,
I think I found the registry value that indicates this - it's at: =
HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\AppliedDPI. The =
Normal value is 96, and "Large" is 120. So I expect the scaling factor =
is 96/120 =3D 0.80 (or you reduce it by 120/96 =3D 1.25).

This routine will return the current value. Note: It requires my "fixed" =
version of the REGISTRY.PRG so you can read out DWORD values. (You can =
get it at http://mmfudg.org/files/reg_up.zip. The registry.prg has been =
tested in VFP 5.0 -> 9.0.)

?testregfontdpi()

*** TestRegFontDpi.PRG ***

#DEFINE HKEY_CURRENT_USER -2147483647 && BITSET(0,31)+1

LOCAL lnRegValue, lcRegfile, lnRetVal, lcRetVal, oReg

lnRegValue =3D 0
lcRegfile =3D _samples+"classes\"+"REGISTRY"
lnRetVal =3D 0

SET PROCEDURE TO (m.lcRegfile) ADDITIVE
oReg =3D CreateObject("Registry")

lnRetVal =3D oReg.GetRegKey("AppliedDPI",@lnRegValue,;
"Control Panel\Desktop\WindowMetrics", HKEY_CURRENT_USER)

IF lnRetVal =3D 0 && No problem
lcRetVal =3D TRANSFORM(lnRegValue)
ELSE
lcRetVal =3D "(Error)"
ENDIF

RELEASE oReg
RELEASE PROC (m.lcRegfile)

RETURN lcRetVal

Rick

"Gene Wirchenko" <genew@ucantrade.com.NOTHERE> wrote in message =
news:2i5ut0da7tr3t2uekmlcrsr0g3797eau1j@4ax.com...
> [reordered to chronological]
>=20
> On Fri, 7 Jan 2005 14:50:38 -0500, "Rick Bean"
> <rgbean@unrealmelange-inc.com> wrote:
>=20
>>"Gene Wirchenko >" <Gene Wirchenko <genew@ucantrade.com.NOTHERE> wrote =
in message news:asjtt01rgpsn02vmm9u3b35p2eek1gi10i@4ax.com...
>>> I have read various posts about how large and small fonts affect
>>> Fox2 apps. How does it apply to VFP? I think I have a case of it.
>>>=20
>>> The symptoms: On one system, text is truncated in labels and
>>> command button captions. The form is the correct size, but the =
fonts
>>> are too big.
>>>=20
>>> How do I find out which font type is in use and the appropriate
>>> scaling factor?
>=20
>>This is usually due to using non-standard fonts. When Windows is asked
> to display a font that isn't installed on that system, "it picks a
> similar one". How Windows determines what's similar to one that it
> doesn't have is undocumented as far as I can find!
>=20
> That sounded like it might be it, but it was not. The font in
> question is Courier New. That is on the trouble system.
>=20
> It turns out to be in Display Properties - Settings - Advanced...
> - General - Display - Font size:. You can set Small fonts or large
> fonts (125% of normal). Questions arise:
>=20
> 1) How do I programmatically detect which font size is in use?
>=20
> 2) Other things are affected by this setting, so I want to know how
> and what to scale so that my displays work on either font size.
>=20
> Sincerely,
>=20
> Gene Wirchenko
>

Re: VFP 6: Large and Small Fonts by David

David
Sun Jan 09 19:53:02 CST 2005

Gene,

You might also recommend the user just look at switching back to small fonts
and going through and increasing the font point sizes nder the Appearance
tab on the desktop properties.
--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro

"Gene Wirchenko >" <Gene Wirchenko <genew@ucantrade.com.NOTHERE> wrote in
message news:asjtt01rgpsn02vmm9u3b35p2eek1gi10i@4ax.com...
> I have read various posts about how large and small fonts affect
> Fox2 apps. How does it apply to VFP? I think I have a case of it.
>
> The symptoms: On one system, text is truncated in labels and
> command button captions. The form is the correct size, but the fonts
> are too big.
>
> How do I find out which font type is in use and the appropriate
> scaling factor?