Print Page | Close Window

[SOLVED]XAML Text quality

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23033
Printed Date: 15 November 2024 at 10:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED]XAML Text quality
Posted By: adrien
Subject: [SOLVED]XAML Text quality
Date Posted: 26 May 2016 at 5:15pm
when we changed from CJ 16.3.1 to 17.2 we noticed that text rendered in XAML was poor quality.  I took a look at the code differences, but there were a lot of changes so not easy to directly compare.

However, we did fix the text quality issue by adding a line of code.  I've seen others post about this, so they can maybe patch their CJ or whatever.

in file XTPMarkupGdiPlusDeviceContext.cpp 

function void CXTPMarkupGdiPlusDeviceContext::Init(BOOL bReInit /*= FALSE*/)

I added

m_pGdiPlus->GdipSetTextRenderingHint(GetGraphics(), TextRenderingHintClearTypeGridFit);

After the call to ApplySmoothingMode()

Cheers

Adrien



-------------
http://www.wingate.com - http://www.wingate.com



Replies:
Posted By: agontarenko
Date Posted: 18 July 2016 at 4:56am
Hello,

I'm glad to inform you that the issue has already been fixed. The fix will be available in the next beta or final release.
Please, see example MarkupPad.exe in it demonstrated how to use this option.

Regards,
Artem Gontarenko


Posted By: Fredrik
Date Posted: 04 October 2016 at 9:42am
Hi, I'm currently patching v17.2 to be able to use it (can no longer wait for next version): is the fix for this issue to call m_pGdiPlus->GdipSetTextRenderingHint(GetGraphics(), TextRenderingHintClearTypeGridFit) ?

For us it had an opposite effect causing bad quality text in other places. Also, I read from the documentation ( http://msdn.microsoft.com/en-us/library/ms535817%28v=vs.85%29.aspx?f=255&mspperror=-2147217396" rel="nofollow - https://msdn.microsoft.com/en-us/library/ms535817(v=vs.85).aspx?f=255&mspperror=-2147217396 ) that TextRenderingHintClearTypeGridFit is only supported on Windows XP and Windows Server 2003?

Regards, 
Fredrik


-------------
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0


Posted By: adrien
Date Posted: 05 October 2016 at 10:17pm
Hi

I see your point, however it seems to work for us on Windows 10, 8, 2k8 etc.  We don't support XP, so didn't even test on that.

You could try a different enum value.


-------------
http://www.wingate.com - http://www.wingate.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net