Pasting CJK characters to a RichTextBox adds an unwanted second font
If you paste the below into a RichTextBox, the CJK character and everything afterwards turns into a second font - SimSun.
Inserting a CJK character: 色
...makes this font change.
This affects the formatting of the RichTextBox in an unwanted way, and also massively slows down large copy/pastes.
I have tried setting the RichTextBox to use a unicode font such as "Lucida Sans Unicode", and also made sure the source I was copying from (Wordpad) was also using the "Lucida Sans Unicode" font. However, at the end of the day, when I paste to the RichTextBox, it forces the use of another font such as SimSun (or other fonts like "Shonar Bangla" or "Microsoft Himalaya" if we use another type of character).
Since "Lucida Sans Unicode" has them all, why can't it stick to the one font?
I noticed someone else also has a similar problem: make a richtextbox only have one font, even if pasted into (vb.net)
Unfortunately, the solutions on that page didn't work for me as I still find the RTB uses another font after the CJK character.
Unfortunately despite its slightly confusing name, Lucida Sans Unicode doesn't contain CJK characters (as you could expect from fonts with Unicode in its name). This triggers some font fallback mechanism which results in a font that contains the required symbol. The only possible solution I see is to use a font that actually contains all required characters.
I've been having this problem on and off, myself.
After flipping around here and there on the internet today, I noticed something on msdn and tried something. Add this line to your Form1_Load(), or to the form constructor AFTER the InitializeComponent() line:
richTextBox1.LanguageOption = RichTextBoxLanguageOptions.DualFont;
I'm no expert, and I can't tell you anything about WHY it works but it DOES for me!