The other answers do a great job of explaining how to measure the height of a letter. As egreg added, the terms "em" and "ex" are subject to the interpretation of the font designer and cannot be used as strict measuring units of a letter's dimension.
I just wanted to add that the notions of a letter's height and depth are also equally subjective. It is typical that curved letters will extend past their designated height and depth. Apparently, it is related to the way the brain perceives small protrusions"overshoots" as balanced or matched to a large/flat non-protrusion. Discussion of this concept can be found at http://ilovetypography.com/2009/01/14/inconspicuous-vertical-metrics/.
I show some examples in the MWE, just to remind the OP that, if the goal is to use the letter's official height and depth to truncate or encapsulate the letter, it will generally not be sufficient.
\documentclass{article}
\begin{document}
\fboxrule=.1pt
\fboxsep=-\fboxrule
\fbox{e}\fbox{Q}\fbox{A}
\end{document}