It seems that namespaces like MonoGame.Framework.Content.Pipeline.Graphics and MonoGame.Framework.Content.Pipeline.Processors don’t exist, and thus lead to missing references like System.ComponentModel, FontDescription and SpriteFontContent.
How should I solve this problem? Or is there a better way to make localized fonts?
I tried reverting all using statements back to “Microsoft.Xna.**” and adding MonoGame.Framework.Windows to LocalizationPipeline’s references, and most errors were gone. Not sure if that fixed the issue though…
There is only one error now:
“Error 1 XML “Type” attribute is invalid. Expecting a subclass of Microsoft.Xna.Framework.Content.Pipeline.Graphics.FontDescription, but XML contains LocalizationPipeline.LocalizedFontDescription.”
It points to a .spritefont file. Inside that file there is one line:
<
Asset Type=“LocalizationPipeline.LocalizedFontDescription”>
And the “LocalizedFontProcessor” option doesn’t show up on the “Content Processor” box on the “Properties” window.
Now I’m really stuck where I am…
Include in your solution the LocalizationPipeline project from the example
Don’t change any references in the project
Inside the LocalizationProcessor class, change the last “return” line to the one below:
return context.Convert<FontDescription, SpriteFontContent>(input, “MGSpriteFontDescriptionProcessor”);
Change the content processor for sprite fonts to “Localized Font Processor” and edit the sprite fonts as shown in the example
Build the project and copy the .xnb font files to the content folder of your iOS MonoGame project.
Just one detail to add. the return line in step 3 should be like this:
return context.Convert < LocalizedFontDescription,SpriteFontContent>(input, “MGSpriteFontDescriptionProcessor”);