ComicTypeface class

The two faces the type is set in: display for heads, numerals and the balance (the look's Bangers), text for everything read (the look's ShantellSans), each from displayPackage and textPackage (the package that bundles it, null for the app's own fonts). The look's faces are the default; an app's own fonts work when it declares them in its pubspec and loads them before the first frame. Each face's cap height (displayCapHeight, textCapHeight) sets its capitals on a control's middle: name it with the face. Sizes follow the platform's text scaling.

final theme = ComicThemeData.offset().copyWith(
  typeface: const ComicTypeface(display: 'ShantellSans', text: 'ShantellSans', displayCapHeight: 0.700),
);
Mixed-in types
Annotations

Constructors

ComicTypeface({String display = 'Bangers', String text = 'ShantellSans', String? displayPackage = comicFontPackage, String? textPackage = comicFontPackage, @Deprecated(_scaleGone) double scale = 1, double displayCapHeight = 0.721, double textCapHeight = 0.700})
The look's faces unless named.
const
ComicTypeface.app({required String display, required String text, @Deprecated(_scaleGone) double scale = 1, double displayCapHeight = 0.7, double textCapHeight = 0.7})
The app's own faces, from its own assets: no package.
const

Properties

display → String
The display face's family.
final
displayCapHeight → double
The height of display's capitals as a fraction of its size: the font's OS/2 sCapHeight over its unitsPerEm (Bangers 0.721). A control's one-line label is drawn with its capitals on its face's middle by it.
final
displayPackage → String?
The package that bundles display; null for the app's own.
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale → double
Every size times this.
final
text → String
The text face's family.
final
textCapHeight → double
The height of text's capitals as a fraction of its size, as displayCapHeight (Shantell Sans 0.700).
final
textPackage → String?
The package that bundles text; null for the app's own.
final

Methods

copyWith({String? display, String? text, double? scale, double? displayCapHeight, double? textCapHeight}) → ComicTypeface
This with the named parts changed.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Methods

lerp(ComicTypeface a, ComicTypeface b, double t) → ComicTypeface
Between a and b: the scale eases, the faces change at the middle.

Constants

look → const ComicTypeface
The look's: Bangers over ShantellSans, at the look's sizes.