PdfCjkStandardFont constructor

PdfCjkStandardFont(
  1. PdfCjkFontFamily fontFamily,
  2. double size, {
  3. PdfFontStyle? style,
  4. List<PdfFontStyle>? multiStyle,
})

Initializes a new instance of the PdfCjkStandardFont class with font family, size and font style.

//Create a new PDF document.
PdfDocument document = PdfDocument()
  ..pages.add().graphics.drawString(
      'こんにちは世界',
      PdfCjkStandardFont(
          PdfCjkFontFamily.heiseiMinchoW3, 20),
      brush: PdfBrushes.black);
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();

Implementation

PdfCjkStandardFont(PdfCjkFontFamily fontFamily, double size,
    {PdfFontStyle? style, List<PdfFontStyle>? multiStyle}) {
  _helper = PdfCjkStandardFontHelper(this);
  PdfFontHelper.getHelper(this)
      .initialize(size, style: style, multiStyle: multiStyle);
  _fontFamily = fontFamily;
  _initializeInternals();
}