ledgerCapHeight function
The cap height, over its size, of the face style sets (its family
with or without the package's prefix); Inter Tight's when it names none.
Implementation
double ledgerCapHeight(TextStyle? style) {
final family = style?.fontFamily ?? '';
return _capHeights[family.substring(family.lastIndexOf('/') + 1)] ??
_capHeights['InterTight']!;
}