Article ID: 110765
Article Last Modified on 10/15/2003
APPLIES TO
- Microsoft Visual FoxPro 3.0b for Macintosh
- Microsoft FoxPro 2.5b for Macintosh
This article was previously published under Q110765
SYMPTOMS
FONTMETRIC(6) and FONTMETRIC(7) do not return the same values for the Courier font. The Courier font on the Macintosh platform is not a monospaced font.
FONTMETRIC(6) returns the average character width in pixels. FONTMETRIC(7) returns the maximum character width in pixels. For monospace fonts, these return values should be identical.
RESOLUTION
As an alternative, you can use the following code. These commands will return the same value if the font is monospace.
? TXTWIDTH('m','Courier',12) ? TXTWIDTH('i','Courier',12)
STATUS
This behavior is by design.
MORE INFORMATION
To reproduce this problem, type the following commands in the Command window:
? FONTMETRIC(6,'Courier',12) ? FONTMETRIC(7,'Courier',12)
The first command returns 7 and the second command returns 11.
Additional query words: vFoxMac FoxMac mono-spaced monospaced
Keywords: KB110765