visualHeightScaleForFontFamily function
Scale for normal text-theme roles relative to the reference font.
Uses a composite font-height metric based on rendered phrase height, x-height, and average phrase character advance. Intended for display/headline/body/label role sizing.
1.0 for a font that the size adjust scales: its bytes already make its letters the reference size (isFontSizeAdjusted).
Implementation
double visualHeightScaleForFontFamily(String? fontFamily) {
if (isFontSizeAdjusted(fontFamily)) return 1.0;
return rasterVisualHeightScaleForFontFamily(fontFamily);
}