Font class abstract

Constructors

Font()

Properties

ascent → double
no setter
axes → Iterable<FontAxis>
no setter
capHeight → double
Distances from the baseline to the top of capital / lowercase letters, stored negative (up is -Y) like ascent. Both fall back to ascent when the font does not provide the metric.
no setter
descent → double
no setter
features → Iterable<FontTag>
no setter
hasColorGlyphs → bool
Whether this font contains any COLR color glyphs (emoji).
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
xHeight → double
no setter

Methods

axisValue(int axisTag) → double
computeShape(List<int> codeUnits, List<TextRun> runs, {TextDirection? direction}) → TextShapeResult
dispose() → void
extractGlyphPath(int glyphId) → RawPath
getColorLayers(int glyphId, {int foregroundColor = 0xFF000000}) → List<ColorGlyphLayer>
Get the colored layers for a color glyph. Returns an empty list for non-color glyphs.
getPath(int glyphId) → RawPath
getUiPath(int glyphId) → Path
isColorGlyph(int glyphId) → bool
Whether a specific glyph has color layers.
lineHeight(double fontSize) → double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shape(String text, List<TextRun> runs, {TextDirection? direction}) → TextShapeResult
shapeCodeUnits(List<int> codeUnits, List<TextRun> runs, {TextDirection? direction}) → TextShapeResult
toString() → String
A string representation of this object.
inherited
withOptions(Iterable<FontAxisCoord> coords, Iterable<FontFeature> features) → Font?

Operators

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

Static Methods

decode(Uint8List bytes) → Font?
disableFallback() → void
enableFallback() → void
initialize() → void
setFallbacks(List<Font> fonts) → void
withFallbacks<T>(T callback()) → T
withoutFallbacks<T>(T callback()) → T