Original: Font improvements in WPF
WPF4 has made a great improvement in font rendering, with the addition of the Textoptions property, which can be set Textformattingmode,textrenderingmode,texthintingmode
1.TextFormattingMode
It provides two types of settings:
· Ideal--wpf4 before the pattern
· display--new mode, can make the font display clearer
(The Textformattingmode is typically set to display, which improves the sharpness of the font display)
2.TextRenderingMode
To set the rendering mode, you can have the following settings:
Auto –this mode would use ClearType unless system settings has been set to specifically disable ClearType on the Machine.
aliased –no antialiasing'll be a used to draw text.
grayscale –grayscale antialiasing'll be a used to draw text.
ClearType –cleartype antialising'll be a used to draw text.
(Generally the font rendered with ClearType will be smoother)
3.TextHintingMode
Gets or sets a value that affects the rendering behavior of text elements, which is a way of performance optimization that can be used when you animate any text property of a text element.
The value of this property takes the following two possible values:
animated is optimized for animations by using a smoother algorithm that is more efficient, but with a visually accurate descent. (The text is still readable; the accuracy loss is not serious.) )
The algorithm used by the Fixed(default) is optimized for visually accurate font smoothing, but can cause performance problems as well as jitter, especially for FontSize or transformation/positioning/projection, when applying animations to the attributes of a FONT element.
(When you need to do some dynamic effects on the font, such as scaling the font, use animated to get higher performance, but also affect the sharpness of its display)
4.wpf4.0 is also optimized for the rendering of East Asian fonts, which now supports bitmap fonts, and opening this new feature is simple, just set a bitmap font for fontfamily.
Here is a list of recommended settings:
Language |
Font |
Traditional Chinese |
MingLiU |
Simplified Chinese |
SimSun |
Japanese |
MS Gothic |
Korean |
Gulium |
Korean |
Batang |
Font improvements in WPF