Font Size

Learn about font size and em size, in this lesson.

We'll cover the following

Font size

The set_font_size function sets the size of the font and, therefore, the size of any text we create with that font. But, what exactly does the size value mean?

Font size is measured in user units —the same units we use when setting the line width. The font size indicates the height of the text, from the top of the tallest alphabetic character, such as a capital “A”, right down to the bottom of the tail of an alphabetic character, such as “g”. Here is an example of this:

Get hands-on with 1200+ tech skills courses.