Content Builder can't find any custom font files when building

I’m trying to make a spritefont with a font I’ve downloaded and any non-standard Windows fonts (Arial, Consolas, etc.) won’t build with the Pipeline Tool giving me the error “Could not find [FONTNAME] font file.”

I’m using Vs2017, MonoGame 3.7.1, and Windows 10.

What am I doing wrong? I’ve triple-checked the name in the spritefont file and tried multiple custom fonts and they all give me the same error.

Thanks

1 Like

When this happens, you can drop the .ttf file next to the .spritefont file and the Content Pipeline will find it.
You don’t need to actually add the .ttf to the content project, it just needs to live next to t the spritefont.

4 Likes

Thank you! That did it!

This was the solution for me but I wanted to add a little to it. Putting the font file in the content folder was not enough in my case. The filename had to match the font name which is specified in the .fontfile. Where the font name might be “Retro 06 Stretched” and the filename was “retro-06-stretched.ttf”, I would get this error. I had to copy the font file to the content folder but also rename the file to match the font name, as in “Retro 06 Stretched.ttf”. Then it worked for me.