PdfPlatformFont class

A font discovered on the host platform (e.g. an OS-installed family), offered as a font-menu choice. The editor can't read font files itself (dart:io is banned in lib/ so the package keeps running on the web), so the host app discovers these and registers them in pdfPlatformFonts: a label, the engine font family to preview the menu entry with (optional) and a lazy byte loader called only when the font is chosen - its outlines then embed into the document so the text renders everywhere.

Constructors

PdfPlatformFont({required String label, required Future<Uint8List?> loadBytes(), String? family})
const

Properties

family String?
The engine font-family name to preview the menu entry with - a real platform family the host knows the system can draw. When null the entry previews in the menu's default face (the bytes still embed on pick).
final
hashCode int
The hash code for this object.
no setterinherited
label String
The name shown in the font menu.
final
loadBytes Future<Uint8List?> Function()
Lazily loads the font's program bytes for embedding. Returns null when the font can no longer be read (e.g. it was uninstalled).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited