Accurately measuring the size of arbitrary RTF content in a RichTextBox when that content contains multiple Fonts and/or multiple Font Sizes, and/or multiple Font Styles is a hard problem !
1. why don't you just use 'Scrollbars on the RichTextBox: set 'ScrollBars property to 'Both so they'll automatically appear as needed ? Sometimes simplest is best !
2. the only fit-RTF-to-container solution I've seen is by Blake Robertson: [
^]; source here: [
^]. His GitHub site is discontinued and I have no idea what state his code is in.
3. if you are willing to expand the size of the RichTextBox so the RTF in it is fully visible, there are several solutions I've seen on StackOverFlow. Just search on "RichTextBox fit text."
3.a. another strategy would be to design a UserControl that had both a RichTextBox, and a kind of "activator" (Label ?Button ? Panel ?) that when you clicked it it would either:
3.a.1. expand the size of the RichTextBox to some pre-defined state
or,
3.a.2. activate the ScrollBars
Unless you are a senior developer and very familiar with using API calls in WinForms (P/Invoke), I advise you to just use ScrollBars.
4. well ... wait a minute ... here's a final thought: use a pop-up Form to display the RTF when the user clicks on the "small display window" on the Form.
You can use the technique shown here for showing plain text (one font, one style, on size) in a TextBox: [
^] fitted to your TextBox area, then, when the user clicks on it, or clicks some Control: then show a pop-up Form with a RichTextBox.