stringMetrics method
Calculate the PdfFontMetrics for this string
Implementation
@override
PdfFontMetrics stringMetrics(String s, {double letterSpacing = 0}) {
if (s.isEmpty || !font.unicode) {
return super.stringMetrics(s, letterSpacing: letterSpacing);
}
final runes = s.runes;
final bytes = <int>[];
runes.forEach(bytes.add);
final metrics = bytes.map(glyphMetrics);
return PdfFontMetrics.append(metrics, letterSpacing: letterSpacing);
}