getKerning method

double getKerning(
  1. int glyphId1,
  2. int glyphId2,
  3. double fontSize
)

Pair-kerning adjustment between two consecutive glyphs, in pixels.

Returns 0 if no kern pair is defined for the combination.

Implementation

double getKerning(int glyphId1, int glyphId2, double fontSize) {
  final value = _kern[(glyphId1, glyphId2)] ?? 0;
  return value * fontSize / metrics.unitsPerEm;
}