![]() |
How to disable font smoothing |
Post Reply ![]() |
Author | |
SvenC ![]() Groupie ![]() Joined: 02 February 2007 Status: Offline Points: 79 |
![]() ![]() ![]() ![]() ![]() Posted: 02 August 2016 at 3:15am |
I would like to control font smoothing / anti-aliasing of the text in the toolkit controls.
Preferred would be that the system setting for font smoothing (Advanced System Settings > Performance Settings > "Smooth edged of screen fonts") would be used so that standard controls like window menus and Toolkit controls use the same way to display font. How can I control text anti aliasing?
|
|
--
SvenC Toolkit Pro 15.3.1, 16.2.4, 16.3.1, 16.4.0, 17.2.0, 17.3.0, 18.0.1, 18.2 with VC++ 2010, 2012, 2013, 2015, 2017 |
|
![]() |
|
SvenC ![]() Groupie ![]() Joined: 02 February 2007 Status: Offline Points: 79 |
![]() ![]() ![]() ![]() ![]() |
Found it by digging through the code:
In my paint manager impl I get the current LOGFONT, set its lfQuality member and apply that font. if(m_fontCaption.GetLogFont(&lf)) { lf.lfQuality = NONANTIALIASED_QUALITY; SetCaptionFont(lf); SetTextFont(lf); } Would be nice if the draw helper class could use some global state and not IsClearTypeTextQualitySupported to control this: BOOL CXTPDrawHelpers::GetIconLogFont(LOGFONT* pLogFont) { ASSERT(pLogFont); if (!pLogFont) return FALSE; ::ZeroMemory(pLogFont, sizeof(LOGFONT)); if (::SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), pLogFont, 0)) { if (XTPSystemVersion()->IsClearTypeTextQualitySupported()) pLogFont->lfQuality = CLEARTYPE_QUALITY; pLogFont->lfCharSet = XTPResourceManager()->GetFontCharset(); return TRUE; } return FALSE; } |
|
--
SvenC Toolkit Pro 15.3.1, 16.2.4, 16.3.1, 16.4.0, 17.2.0, 17.3.0, 18.0.1, 18.2 with VC++ 2010, 2012, 2013, 2015, 2017 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |