rodkort
rodkort

Reputation: 93

RTF String Font Size

I am a little confused with the RichTextBox.Rtf property. I am inputting a string with a mix of font sizes: Test with font size of 20 and string as font size of 10. However when I look at the Rtf string, I get the following:

{\rtf1\ansi\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\fnil\fcharset0 Arial;}}\r\n\viewkind4\uc1\pard\fs40 Test\fs20 string\fs20\par\r\n}\r\n

That suggests the font size is 40 and 20 - can anyone tell me why they differ?

Upvotes: 8

Views: 9061

Answers (1)

rene
rene

Reputation: 42414

From the RTF specification:

\fsN Font size in half-points (the default is 24).

Which matches your observation...

Upvotes: 11

Related Questions