textStyle method
The style the font-drawn glyphs use, from the display's base style
(e.g. a condensed width axis). Measuring and painting both use it.
Implementation
@override
TextStyle textStyle(TextStyle base) {
final font = BundledFont.fromFamily(base.fontFamily);
if (!font.isBundled) return base;
final weight = (base.fontWeight ?? FontWeight.w400).value.toDouble();
return base.copyWith(
fontVariations: font.variations(
weight: weight,
width: widthPermille / 10,
fontSize: base.fontSize,
),
fontFeatures: font.features(),
);
}