adjustedUnitsPerEm function

int? adjustedUnitsPerEm(
  1. String fontFamily,
  2. int unitsPerEm
)

head.unitsPerEm that the size adjust writes for a file of fontFamily with unitsPerEm, or null if it does not scale the family.

Implementation

int? adjustedUnitsPerEm(String fontFamily, int unitsPerEm) {
  if (!isFontSizeAdjusted(fontFamily)) return null;
  return (unitsPerEm / rasterVisualHeightScaleForFontFamily(fontFamily))
      .round();
}