findFont method
Font named name (with the slash, /F1), or null.
Implementation
@override
PdfContentFont? findFont(String name) {
if (_fontCache.containsKey(name)) return _fontCache[name];
PdfContentFont? font;
final fonts = _subDictionary('/Font');
final entry = fonts?.values[name];
if (entry != null) {
final fontDict = parser.resolve(entry);
if (fontDict is PdfDictToken) {
font = buildFont(parser, fontDict, resourceName: name);
}
}
font ??= parent?.findFont(name);
_fontCache[name] = font;
return font;
}