PdfFont getFont(Context context) { if (_pdfFont == null || _pdfFont!.pdfDocument != context.document) { final pdfDocument = context.document; _pdfFont = buildFont(pdfDocument); } return _pdfFont!; }