Search

MFC forcibly enables cleartype in afxGlobalData.fontRegular and others by zeromus

Closed
as By Design Help for as By Design

1
0
Sign in
to vote
Type: Bug
ID: 780747
Opened: 3/5/2013 7:45:17 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug

MFC is forcibly enabling cleartype when segoe UI font is found. This happens in afxglobals.cpp, where the following code is run

lf.lfQuality = 5 /*CLEARTYPE_QUALITY*/;

This is happening in the vs2010 MFC as well.

I would imagine this is being done because MFC must use the segoe UI font instead of the system default font. I'm not clear on why MFC needs to be doing this. It is contributing to a ghetto chaos rotted appearance which makes windows software nowadays frequently resemble a 1997 linux desktop. It makes MFC parts look wrong compared to other parts of apps which take pains to be respectful of the user's configuration.

Understandably, the segoe UI font was not designed to be used without cleartype. And that is why someone thought it was wise to add this code to force cleartype. But, anyone who has disabled cleartype would rather see ugly apps than cleartyped apps. I feel confident speaking for them.

Finally, I know MFC can be caused to use the system default font. I am not looking forward to asking every developer of MFC software to change his code in order to bypass MFC's font trickery. I would rather system libraries use the system default fonts as a default font.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

Visual Studio 2012

Steps to reproduce




use a system with cleartype disabled. create a CMFCTabCtrl and add a tab. This is one place you can see the cleartype rendering.

Product Language

English

Operating System

Windows 7 SP1

Operating System Language

English

Actual results




cleartype rendering is used for tab labels

Expected results




cleartype rendering is not used on a system which has cleartype disabled
File Attachments
0 attachments
Sign in to post a comment.
Posted by zeromus on 3/12/2013 at 9:31 AM
OK. As a consequence of this, you're forcing users who have disabled cleartype to see cleartype. You should at least get the user's system font antialiasing preference and apply it correctly when creating the office 2007 font.
Posted by Microsoft on 3/11/2013 at 2:10 PM
Hello,

Thanks for the report. We have investigated this and found that it is by design: we've used the same font as MS Office 2007 (for consistency), instead of the system font. If for some reason you need to use the system menu font instead, it's possible to override the behavior by setting this:

afxGlobals.m_bUseSystemFont = TRUE;

in your application class constructor.

Pat Brenner
Visual C++ Libraries Development
Posted by Microsoft on 3/7/2013 at 4:34 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 3/5/2013 at 7:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.