[SOLVED]XAML Text quality |
Post Reply |
Author | |
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(2)
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 |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 299 |
Post Options
Thanks(0)
|
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 |
|
Fredrik
Senior Member Joined: 22 June 2005 Status: Offline Points: 235 |
Post Options
Thanks(0)
|
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 (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
|
|
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(0)
|
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.
|
|
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 |