IconFont class

Glyph outlines from an icon font, such as Flutter's MaterialIcons.

Reads OpenType fonts with CFF outlines (OTTO, what Flutter ships for Material icons) and TrueType outlines (glyf). Only what icons need is read: the character map, the outlines, and the metrics that place a glyph in its box.

Properties

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

Methods

glyph(int codePoint, double size) → IconGlyph?
codePoint drawn the way Flutter's Icon draws it at size: the glyph set at fontSize: size, height: 1, centered in a size square. Null when the font has no such glyph; IconGlyph.isEmpty when it has no ink.
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

load(String path) → IconFont?
parse(Uint8List bytes) → IconFont?
Parses bytes, or returns null when they are not a supported font.