BitmapFont class

A bitmap font that can be used with drawString and drawChar functions. If you want use own fonts following with this steps: 1. Get your .ttf file - important is to select file with specific style which you want for example when you download .ttf file from google fonts: select file from /static folder example name: Roboto-Black.ttf 2. Convert ttf file to fnt zip with page: https://ttf2fnt.com/ 3. Create dart file with code: void main() { String fileName = 'YourFontName-Style.zip'; // your file has to be in the same folder as this program File file = File('$fileName'); List

Constructors

BitmapFont.fromFnt(String fnt, Image page)
Decode a BitmapFont from the contents of font definition (.fnt) file, and an Image that stores the font map.
BitmapFont.fromZip(List<int> fileData)
Decode a BitmapFont from the contents of a zip file that stores the .fnt font definition and associated PNG images.

Properties

antialias bool
getter/setter pair
base int
getter/setter pair
bold bool
getter/setter pair
characters Map<int, BitmapFontCharacter>
getter/setter pair
charset String
getter/setter pair
face String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
italic bool
getter/setter pair
kernings Map<int, Map<int, int>>
getter/setter pair
lineHeight int
getter/setter pair
outline bool
getter/setter pair
packed bool
getter/setter pair
padding List<int>
getter/setter pair
pages int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleH num
getter/setter pair
scaleW num
getter/setter pair
size int
getter/setter pair
smooth bool
getter/setter pair
spacing List<int>
getter/setter pair
stretchH int
getter/setter pair
unicode String
getter/setter pair

Methods

characterXAdvance(String ch) int
Get the amount the writer x position should advance after drawing the character ch.
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