Adobe doesn't really provide font details through their API. You might be able to calculate it using system calls about the font in question though; Illustrator's internal coordinate system is pixels, so if you can figure out the pixel height of the x-height from queries about the font through the OS, that might be the same as in Illustrator.
Thanks for the reply,
I saw an API GetDistanceToBaseline, it is written in the documentation that this api is used to retrieves the distance to the baseline in the font.
But It's not mention, distance to baseline from where? Is it from the ascent or mean line?
Honestly, I'm not sure I know we use that function in our stuff, so my colleague problems knows more than I (she has written most of our text stuff). There are some methods in the GlyphRunSuite that kind of feign in the direction of that kind of information (GetMinCapHeight(), GetMaxCapHeight(), etc.) but nothing as specific as you're looking for. I'm pretty sure I saw something that gave you the ascender height (maybe descender too?) but not its far from complete. If you haven't already, open ATESuites.h and see what you can find. They're clearly not striving for complete font metrics though, which is kind of a shame -- we'd certainly make use of that if it was in there.
Thanks for showing me the direction.
I'll look into the ATESuites.h and see what I can find.