Hi, I used content project in vs 2012 express before and got a strange error on iPhone. Two of my textures made device hang, while in emulator I had no problems.
Now I’m trying to use MonoGame Pipeline tool in attempt to avoid those errors, but application doesn’t like my xnb files. I set “platform” setting to “iOS”. All content files set to “content” in build options.
The message from Xamarin studio is “Could not load Fonts/pt-sans-bold-24 asset as a non-content file!”
I have two questions: why may some textures make iPhone hang and what am I doing wrong with MonoGame Pipeline tool?
That error occurs only if the XNB content file could not be found. This means one of two issues:
- You are not packaging the compiled XNB content correctly.
- You are requesting the wrong file name (iOS is case sensitive).
Thank you Tom, I found that I forgot to update monogame on mac. The older version could not load new xnb files.
Now, the game works fine, but there is a problem with fonts: non-latin characters have wrong encoding.
My Spritefont files look like this:
<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<FontName>PT Sans</FontName>
<Size>20</Size>
<Spacing>0</Spacing>
<UseKerning>true</UseKerning>
<Style>Bold</Style>
<CharacterRegions>
<CharacterRegion>
<Start> </Start>
<End>~</End>
</CharacterRegion>
<CharacterRegion>
<Start>А</Start>
<End>я</End>
</CharacterRegion>
<CharacterRegion>
<Start>Ё</Start>
<End>Ё</End>
</CharacterRegion>
<CharacterRegion>
<Start>ё</Start>
<End>ё</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>
The files saved in utf-8, and it worked fine before.
Hum… do you mind putting up an issue on the GitHub site for this.
Be sure to include your example .spritefont that has issues.
It was very fast! Thanks for developing Pipeline tool, it is very useful.
1 Like