I'd like to know the .ex value of, say, helvetica at 20px. To put it another way, in the web page below, what would be the ex value of "Hello", in pixels? (And more generally, how to do this for an arbitrary font at an arbitrary size?)
<html>
<head>
<style>
body {
font-family:Helvetica;
font-size:20px;
}
</style>
</head>
<body>
Hello
</body>
</html>
===========
For example, after some convoluted approach using MathJax's SVG output mode (that specifies the height of the SVG in ex with respect to the surrounding page's font) I found that the ex value of Helvetica at 20px is something quite close to
10.467px
(safari and chrome both), while the ex value of Helvetica at 21px is something close to
10.982px
(again, safari and chrome both), and so on. These numbers seem to be independent of any other parameters besides the font and its size. So how to get them?
Since my method of getting these ex-values is really convoluted, and I am not obtaining the "official" ex value of the font, but rather a reverse-engineered ex value, I would like to know a non ad-hoc way of getting the "official" ex value.