How to change the font size of a text in a report with code

Hi, I have a report with a text connected to a textbox that would adjust the font size depending on how long the user write in the textbox. What would be the line of code to change that font size?