PdfCjkStandardFont.protoType constructor
PdfCjkStandardFont.protoType(
- PdfCjkStandardFont prototype,
- double size, {
- PdfFontStyle? style,
- List<
PdfFontStyle> ? multiStyle,
Initializes a new instance of the PdfCjkStandardFont class with PdfCjkStandardFont as prototype, size and font style.
//Create a new PDF document.
PdfDocument document = PdfDocument();
//Draw the text.
document.pages.add().graphics.drawString(
'Hello World!',
PdfCjkStandardFont.prototype(
PdfCjkStandardFont(PdfCjkFontFamily.heiseiMinchoW3, 12), 12),
brush: PdfBrushes.black);
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();
Implementation
PdfCjkStandardFont.protoType(PdfCjkStandardFont prototype, double size,
{PdfFontStyle? style, List<PdfFontStyle>? multiStyle}) {
_helper = PdfCjkStandardFontHelper(this);
PdfFontHelper.getHelper(this)
.initialize(size, style: style, multiStyle: multiStyle);
_fontFamily = prototype.fontFamily;
if (style == null && (multiStyle == null || multiStyle.isEmpty)) {
PdfFontHelper.getHelper(this).setStyle(prototype.style, null);
}
_initializeInternals();
}