Creating spritefonts, can't load or crashes.

Hi,

I’m trying to use the content processor to build a .xnb spritefont, however I got two issues. One of them is not loading the file (Could not load…) and the other one simply crashes monodevelop. I’ve noticed other topics like this, but could not find any applicable answers, or no answers at all in some cases.

First issue: Error: System.Exception: Could not load /home/…long path…/Segoe UI Regular
at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.Process

That’s when I try to load with the font’s name, it looks like monogame search for it by the name “/Segoe UI Regular”, but everything is fine, the .ttf and .spritefont are in place, however, it does not load it by name. Then I try to change the name to match the file and monodevelop crashes when I build, everytime.

Also tried using the content pipeline from the current monogame develop build, but it changes nothing. Monogame build is set to linux too. I’m using this http://teamcity.monogame.net/viewLog.html?buildTypeId=MonoGame_DevelopWin&buildId=lastSuccessful&tab=artifacts&buildBranch=<default>&guest=1#!xl2eo

Any help would be appreciated, thanks.

From what I know you can’t compile spritefonts from linux, for now. You must compile spritefonts from Windows and then link compiled fonts as your content. I just keep arial, times new roman and few others compiled in all sizes.

Oh, ok. Good idea, but I’ll keep using my custom png / xml font thingy then. Thanks again @cra0zy

I just keep arial, times new roman and few others compiled in all sizes.

Any chance you could share the .xnb files with us? I have arial in size 18 font I’ve been using because I don’t want to bother with the setup to compile. I would love the other font sizes though.

I’ve wrote a script that just went through all the fonts installed on my computer, and compile each one of them into an xnb file Here are some fonts: https://mega.co.nz/#F!iJgSBbyZ!bxZpuAXDUsGPqlsij5mTpA

P.S. Tell me if you want some specific font, and I’ll add it.

1 Like

Wow, thank you cra0zy that is excellent. I’m partial to Calibri personally but this is more than I could have imagined :slight_smile:

I’ve added calibri and calibri light

Wow thanks! That is perfect!