PdfStandardFont constructor
PdfStandardFont(
- PdfFontFamily fontFamily,
- double size, {
- PdfFontStyle? style,
- List<
PdfFontStyle> ? multiStyle,
Initializes a new instance of the PdfStandardFont class with font family, size and font style.
//Create a new PDF document.
PdfDocument document = PdfDocument()
..pages.add().graphics.drawString(
'Hello World!', PdfStandardFont(PdfFontFamily.helvetica, 12),
brush: PdfBrushes.black);
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();
Implementation
PdfStandardFont(
PdfFontFamily fontFamily,
double size, {
PdfFontStyle? style,
List<PdfFontStyle>? multiStyle,
}) {
_helper = PdfStandardFontHelper(this);
PdfFontHelper.getHelper(
this,
).initialize(size, style: style, multiStyle: multiStyle);
_fontFamily = fontFamily;
_checkStyle();
_initializeInternals();
}