Last Modification: December 11, 1999

How do I detect if Large Fonts are being used?

You can get that information by calling GetDeviceCaps():


int nRes = GetDeviceCaps(LOGPIXELSY);

if (nRes < 96) 
    { /* smaller than small fonts */ }
else if (nRes == 96) 
    { /* small fonts */ }
else if (nRes < 120) 
    { /* between small and large */ }
else if (nRes == 120) 
    { /* large fonts */ }
else 
    { /* larger than large fonts */ }

When you look up the two articles below, be aware of a bug in Q137556: It won't detect: smaller than small fonts; larger than large fonts; or fonts between small and large.

References and samples: