We are having trouble loading a plain Arial spritefont as an XNB in MonoGame on iOS. I tried this using the latest develop branch. These were made on Windows, then followed up in Xamarin studio for the iOS part:
<MonoGamePlatform>iOS</MonoGamePlatform>
defined <Import>
statement pointing to MonoGame.ContentPipeline.targets
MonoGameContentProcessors.dll
in the content project Content Processor
set to MonoGame SpriteFont
Content
. I tried this in an empty MonoGame project with Arial 9pt, and I get an exception in Texture2D.cs line 228 where it is checking for OpenGL errors.
We have other fonts in our game that are built as a MonoGame Spritefont from Texture
that work fine. But we can't use this method for some languages (Chinese, especially).
I found some other people have this problem: https://monogame.codeplex.com/workitem/7452
Any ideas? Are fonts working on iOS currently?
Here are my compiled XNBs: https://dl.dropboxusercontent.com/u/3702398/Fonts.zip
UPDATE: tried Arial 9, 12, 14, 16, as I heard certain sizes were causing issues. None of them worked.
Opened issue here: https://github.com/mono/MonoGame/issues/2005
I've found the solution from discussion here .
I was setting things only in the content project, which is the wrong place. Tom Spilman mentioned you don't need anything in the content project at all, but I just left it because it works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.