BitmapFont.fromFnt constructor
Decode a BitmapFont from the contents of fnt
definition (.fnt) file,
and an Image that stores the font map.
Implementation
BitmapFont.fromFnt(String fnt, Image page) {
final fontPages = {0: page};
XmlDocument doc;
fnt = fnt.trimLeft();
if (fnt.startsWith('<?xml') || fnt.startsWith('<font>')) {
doc = XmlDocument.parse(fnt);
} else {
doc = _parseTextFnt(fnt);
}
_parseFnt(doc, fontPages);
}