I started learning MonoGame since couple days ago, currently trying to use SpriteFont. But building .spritefont asset always fails with NullReferenceException. Version of the pipeline is 3.8.0.600.
On 3.7.1 however, it doesn’t generate error. But rasterizing font is crazy slow. I am trying to use font with ~17k glyphs in size of 12pt, and it doesn’t progress at all. I slept about 5 hours after started building font, and it did nothing. I think the pipeline stuck in infinite loop in certain glyph, because removing certain character region from rasterizing does pipeline to work again. But I think it’s slow even without ‘possible infinite loop’ issue, 7 seconds on just about 100 glyphs seems curious to me.
That’s a lot of glyphs Remember it is building all those glyphs into a texture, so the result is gonna be very large indeed.
I’m guessing your building an Asian language, in which case you will need to use localised sprite font, and only build the characters you actually need. I did it recently for CJK languages, but I can’t find the resource I followed. Although a quick google search did bring this up which I didn’t know about, sounds useful - http://www.axiomverge.com/blog/localized-font-textures-in-monogame
So I changed FontName to use file name instead of font’s stored name, cut down glyphs to 2 sections - Basic Latin and Hangul Syllables, and while it took off NullReferenceException issue that I had before, it still gets stuck in building spritefont again. It seems like this issue is neither caused by my .spritefont file, nor TTF file itself.
EDIT: The version is still 3.8.0.600. Nothing big change was done, except the .spritefont resource file.