Font Importer Bug on OSX: can't process font

I am trying to get a specific font (Aspergit Bold) into my IOS app and the font importer is failing when I run it from Xamarin on OSX. This is the output:

	Building Font  [...]/IOS/Content/Fonts/Aspergit Bold
	[...]/IOS/Content/Fonts/Aspergit.spritefont: error: Processor 'FontDescriptionProcessor' had unexpected failure!
	System.Exception: Could not load [...]/IOS/Content/Fonts/Aspergit Bold
	  at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.Process (FontDescription input, ContentProcessorContext context) [0x00141] in <a08ce79bc40d4146bf2ee59422c41dea>:0 

This only happens on IOS. It does not happen on Windows.

In my .spritefont file, this FontName tag looks like this:

<FontName>Aspergit Bold</FontName>

I am sure that the font is installed correctly on the system. Below I have attached a picture of the font being used in GIMP. I even rebooted the mac just in case.

If I change the FontName to “Arial Narrow” it works perfectly.

The only thing unusual about the font is that it is an .otf file instead of .ttf. But I did not think this would be an issue because the importer works on windows with this font just fine.

Try putting the .otf file in the same directory as the .spritefont file and change the FontName in the .spritefont file to the .otf name including the extension. This will look for the font in the same directory as the .spritefont file, you don’t have to install the font, and is easier to put the font into source control.

1 Like

This workaround functioned flawlessly! Thanks!!

I actually think of it as the preferred option. Keeps the font local to the project. No need to install on each PC the project will be built on. And easy to use with source control.