lineHeightAt method

double lineHeightAt(
  1. double fontSize
)

Line height recommended for this font at the given fontSize in pixels.

Equals (ascender - descender + lineGap) * fontSize / unitsPerEm.

Implementation

double lineHeightAt(double fontSize) {
  final scale = fontSize / unitsPerEm;
  return (ascender - descender + lineGap) * scale;
}