Problems related to WPF text rendering and their solutions

Source: Internet
Author: User

??WPF often encounters various issues related to text rendering, and now enumerates the following phenomena and solutions.
(1)phenomenon: Text size, not the same horizontal line, different words rendered into the same word, or font hollow
reason: Microsoft ya black font for Chinese characters rendering support is not good, the following is the system recommended language font settings table, and MSFT in the built-in bitmap mapping table for East Asian characters are optimized.

Language

Font

Traditional Chinese

MingLiu

Simplified Chinese

SimSun

Japanese

MS Gothic

Korean

Gulium

Korean

Batang


Workaround:according to the recommended table, the Chinese try to choose SimSun, the effect is as follows:

(2)phenomenon: When placed in the Viewbox, the blur occurs
Reason: UnknownWorkaround: Change Textformattingmode to Ideal
(3)phenomenon: TextBlock in Popup, if text contains '-', that is, minus, the last word of each line is lostReason: UnknownWorkaround: Change Textformattingmode to Ideal

(4)phenomenon: Text hair green, display colorful abnormal


Workaround:update the video driver to verify that the system ClearType is turned on.



Reference: http://blogs.msdn.com/b/text/archive/2009/08/24/wpf-4-0-text-stack-improvements.aspxhttps:// Msdn.microsoft.com/zh-cn/library/system.windows.media.textrenderingmode (v=vs.100). aspxhttps:// Msdn.microsoft.com/zh-cn/library/system.windows.media.textformattingmode (v=vs.100). aspxhttps:// Msdn.microsoft.com/zh-cn/library/system.windows.media.texthintingmode (v=vs.100). aspx






Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Problems related to WPF text rendering and their solutions

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.