user1327407
user1327407

Reputation: 103

SubAntialiasing fonts

In some places, I got sub antialiasing on, and on another places, I dont. I use "Display" rendering mode combined with ClearType.

However, it's really random, it uses grayscale antialiasing, instead of colourful one. And it looks bad. How can I force it?

It works differently, based on operating system I guess. But the weird part is, some places I have SubAA on, and another I dont.

And when on different windows, some places I have subAA on as a whole. Do you have any ideas why this inconsistency exists? I want SUBAA!!

Thanks

Upvotes: 4

Views: 2389

Answers (1)

Colin Smith
Colin Smith

Reputation: 12540

There are certain situations when ClearType will get disabled in the rendering path which means it will then revert to grey scale anti-aliasing:

  • When you use AllowsTransparency="True" on a Window

  • When ClearType is disabled in Windows Settings (and you haven't used TextOptions.TextRenderingMode="ClearType" to force the use of ClearType)

  • ClearType text does not display correctly on a background that is not fully opaque i.e you introduce some transparency.

  • If Text is rendered to an intermediate target due to the use of a:

    • VisualBrush
    • DrawingBrush
    • OpacityMask
    • Viewport2DVisual3D
    • Effect
    • BitmapEffect

Are you using TextOptions.TextFormattingMode="Display" on your top level element i.e. Window? (the property is inherited so you if you put it there it should apply to everything in your Window).

You can use RenderOptions.ClearTypeHint="Enabled" to re-enable ClearType in the rendering path but you may have artifacts because there was usually a good reason to disable it.

You can use TextOptions.TextHintingMode="Fixed" when you have animations and you don't want to have lower-quality text rendering (i.e. ClearType disabled) while the animation is in effect.

You can use TextOptions.TextRenderingMode="ClearType" to force ClearType to be used even then the Windows System Settings have not enabled it (this won't do anything special for you in this case, it's here for reference).

Upvotes: 3

Related Questions