How to force a Win32 RichEdit fallback to SimSun with East Asian text?

谁都会走 提交于 2019-12-06 02:50:31

You can set the default font for character representations by sending the RichEdit control an EM_SETCHARFORMAT message with the SCF_ASSOCIATEFONT flag.

This involves filling in a CHARFORMAT2 structure with the characteristics of the desired font as well as the LCID corresponding to the locale of the desired character representation, as outlined in the documentation.

See also: How to Use Font Binding in Rich Edit Controls

It looks like to me that Windows 8 introduced the "Microsoft YaHei" font as the default UI font for the Simplified Chinese script. I think (but I'm not certain) that SimSun used to be the default font for this script, so that would explain it if you were seeing this behavior on some systems and not others.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!