DVSystemFonts class

The fonts installed on the machine.

final DVFontFamilies families = await DV.Platform.fonts.families();
if (families.isEmpty) showNote(families.reason!);

final String family = await DV.Platform.fonts.load('DejaVu Sans');
DVText('Amazing grace').fontFamily(family);

Constructors

DVSystemFonts()
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

faces({String? family}) → Future<List<DVSystemFontFace>>
Every installed face, or those of family (matched without regard to case), in the order the platform lists them. Empty where families would be, for the same reason.
families() → Future<DVFontFamilies>
Every installed family, once each, sorted without regard to case.
isLoaded(String family) → bool
Whether family has been loaded into the engine by load.
load(String family) → Future<String>
Loads an installed family into the engine and returns the name to use as fontFamily, spelled as the font spells it.
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

Static Methods

debugReset() → void
Forgets what load loaded. For tests: the engine keeps the fonts.