I'm trying to determine how Illustrator calculates the baseline position from the top of the bounding box for a Point Text object. It appears to be the same distance as an Area Text object with the First Baseline setting set to Em Box Height. I just can't figure out what property in a font's metrics this corresponds to. Illustrator's help defines it as:
"The top of the em box in Asian fonts touches the top of the type object. This option is available regardless of the Show Asian Options preference."
For some fonts, this distance seems to be close the the font's ascender but this doesn't hold true for every font. Any clues how Illustrator calculates this?
here you go
var idoc = app.activeDocument; var itext = idoc.selection; var top = itext.position; var base = itext.anchor; alert('Em? size: ' + (top-base));
Yes! I don't know how I missed the anchor property. This is exactly what I was looking for. Thank you!!
I'm still a little curious how Illustrator determines the baseline position as it relates to a font's metrics. However, it doesn't really matter -- I can do what I need to do now.
The baseline must be the text "path", the only known value, plus the overall bounding box