BitmapFont class Null safety

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 bytes = file.readAsBytesSync(); print(bytes); } 4. Change fileName in code above to your file name 5. Run this program 6. Copy results 7. Create dart file in your project with code: final BitmapFont fontNameSizeStyle = BitmapFont.fromZip(_FONTNAME_SIZE_STYLE); const List _FONTNAME_SIZE_STYLE = <PASTE_HERE>

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
read / write
base int
read / write
bold bool
read / write
characters Map<int, BitmapFontCharacter>
read / write
charset String
read / write
face String
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
italic bool
read / write
kernings Map<int, Map<int, int>>
read / write
lineHeight int
read / write
outline bool
read / write
packed bool
read / write
padding List<int>
read / write
pages int
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scaleH num
read / write
scaleW num
read / write
size int
read / write
smooth bool
read / write
spacing List<int>
read / write
stretchH int
read / write
unicode String
read / write

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 non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited