With this script for Adobe InDesign you can determine the x-height of a text passage.
https://www.rolanddreger.net/de/503/x-hoehe-ermittlen
Free Script for private and commercial use. Creativ Commons Licence: Roland Dreger, CC BY 3.0 AT
Use at your own risk.