isFontSizeAdjusted function

bool isFontSizeAdjusted(
  1. String? fontFamily
)

Whether the size adjust scales fontFamily's bytes.

True when the size adjust is on and the family has Latin ink data (D3), and rounding its unitsPerEm is exact enough (D7). Then the theme gives it the requested font size, and its values in em are scaled by fontEmScale.

Implementation

bool isFontSizeAdjusted(String? fontFamily) {
  if (!_fontSizeAdjustEnabled || fontFamily == null) return false;
  final key = normalizeFontFamilyForFontMetrics(fontFamily);
  return kLatinInkAboveEmByFontFamily.containsKey(key) &&
      !kFontSizeAdjustExcludedFontFamilies.contains(key) &&
      rasterVisualHeightScaleForFontFamily(fontFamily) != 1.0;
}