views:

106

answers:

0

Hello, I am using C# 3.5 Richtextbox and the component has Verdana as a default font. My problem occurs after inserting some f.e. Czech text from Web browser (or with method AppendText), there is my RTF:

{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset238{*\fname Courier New;}Courier New CE;}{\f1\fmodern\fprq6\fcharset134 Adobe Fangsong Std R;}{\f2\fnil\fcharset238 Verdana;}} \viewkind4\uc1\pard\lang1029\f0\fs30 Volebn\'ed mana\'9eer socan\'f9 Jaroslava nejprve nasucho SPARTA a BANIK rozkradl \'c8SAD a nyn\'ed smrd\'ed z Lidov\'fdho domu.zla\'9dou\'e8k\'fd kon\'ed\'e8ek \'fap\f1\'a8\'a7l\f2\fs17\par }

As you can see there are 2 fonts defined: Courier New CE & Adobe Fangsong that broke my output in TextBox. When I write the same text directly into RTF there is no problem with fonts. I have tried to modify font with SelectionStart ... but without success.

Thank you for your ideas about solving the problem.