XPLMGetFontDimensions

XPLM_API void       XPLMGetFontDimensions(
                         XPLMFontID           inFontID,
                         int *                outCharWidth,    /* Can be NULL */
                         int *                outCharHeight,    /* Can be NULL */
                         int *                outDigitsOnly);    /* Can be NULL */

This routine returns the width and height of a character in a given font. It also tells you if the font only supports numeric digits. Pass NULL if you don’t need a given field. Note that for a proportional font the width will be an arbitrary, hopefully average width.