toPdfTextStyle method
Implementation
Future<pw.TextStyle> toPdfTextStyle(FontData fontData) async => pw.TextStyle(
color: color?.toPdfColor(),
fontSize: fontSize,
fontStyle: fontStyle?.toPdfFontStyle(),
fontWeight: fontWeight?.toPdfFontWeight(),
height: height,
letterSpacing: letterSpacing,
wordSpacing: wordSpacing,
decoration: decoration?.toPdfTextDecoration(),
decorationColor: decorationColor?.toPdfColor(),
decorationStyle: decorationStyle?.toPdfTextDecorationStyle(),
decorationThickness: decorationThickness,
inherit: inherit,
font: fontFamily != null
? await resolveFont(fontFamily!, fontData)
: null,
fontFallback: fontFamilyFallback != null
? await Future.wait(fontFamilyFallback!
.map((String font) => resolveFont(font, fontData)))
: [],
background: backgroundColor != null
? pw.BoxDecoration(
color: backgroundColor!.toPdfColor(),
)
: null,
);