rds1983 / SpriteFontPlus

MonoGame/FNA Library that extends functionality of the SpriteFont.
MIT License
147 stars 33 forks source link

Support for glyph designer fonts #36

Open Owlzy opened 4 years ago

Owlzy commented 4 years ago

Hi there,

Does this library support fonts exported from glyph designer?

http://www.71squared.com/glyphdesigner

It uses the same .fnt format as BMFont, and in other engines we were able to use to two interchangeably. However when I try the font file from samples, it works fine, but using a font from glyph designer is throwing a null exception error in LoadXml(reader).

System.NullReferenceException: 'Object reference not set to an instance of an object.'

SpriteFontPlus.dll!Cyotek.Drawing.BitmapFont.BitmapFont.LoadXml(System.IO.TextReader reader)

Manually comparing the XML I don't see much difference, there are just a few attributes missing, such as color. But with the lib compiled I can't see exactly whats causing the error. I can provide the font file if needed?

Thanks