Font improvements in WPF

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.