Get height of font

How do you get the height of the tallest character within a particular font?


Check out Page Not Found — Xojo documentation .


Is TextAscent really what you want here? That is the height from the top to the line that uppercase characters sit on, the baseline. Lower case characters with descenders are going to extend below this point aren’t they. Even the documentation states the following:

TextAscent is the height of the tallest font letter above the font baseline.

So that actually only gives the height of uppercase characters in my mind but I am certainly no expert. I would think that TextHeight is the figure to use. That is the height that you must go down for each line of text to appear properly in the mind of the person who designed the font. Then, recently, it was even pointed out that some weird fonts don’t follow any rules at all.

TextHeight is (ascent+decent) in the below diagram… so it depend on what you need

It’s actually more than just ascent and descent. TextHeight also includes the leading, that little space below the descenders that gives the gap between lines of text according to a Font Metrics chart that I have. There are a lot of items in fonts that aren’t exposed in Xojo but then we seldom have to space each character on our own…thankfully. I believe that there is typically also a little space above the upper case characters. Here is the Font Metrics chart that I typically refer to:
link text

A good resource about fonts :