Why can't DirectX/DirectWrite/Direct2D text rendering be as sharp as GDI?

后端 未结 1 611
一整个雨季
一整个雨季 2020-12-14 02:45

I already know that sub-pixel positioning causes DirectWrite text rendering to be blurry compared to GDI.

However, my question is a bit more fundamental:

相关标签:
1条回答
  • 2020-12-14 02:55

    You aren't comparing like with like. Your Direct2D samples are all rendered in grayscale, whereas the GDI and Linux samples are using sub-pixel anti-aliasing (aka ClearType on Windows).

    This page describes what you need to do to enable cleartype: http://msdn.microsoft.com/en-us/library/windows/desktop/dd368170%28v=vs.85%29.aspx

    N.B. When testing rendering like this, it's always worth using Windows Magnifier or similar to check that you are actually getting what you think you are getting.

    0 讨论(0)
提交回复
热议问题