New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with iOS Fonts #2005
Comments
mr. peppers - do you see any unusual output during the build process? The output window should contain a statement such as "MonoGame iOS Platform", or similar. |
All I'm seeing are lines like this: Building Fonts\Arial_16.spritefont -> F:\MyPath\bin\x86\Release\Content\Fonts\Arial_16.xnb Do I need to turn on a higher log level during build? I do feel like it's running through the MonoGame pipeline though, because my source control shows the file is different if I change the content processor to the XNA one. |
@jonathanpeppers Probably not related, but are you using a normal Arial font to get these Chinese characters or Arial Unicode? |
For this issue, I'm using English only with only English character ranges. Basically used the default *.spritefont template and changed it to Arial. |
hehe: F:\MyPath\bin\x86\Release\Content\Fonts\Arial_16.xnb This is no bueno. It should be output in "bin\iOS..." if you are indeed using the iOS content builder. |
Have this in csproj:
Tried adding to the main XNA application, same results. Then my font is setup like this in the content .csproj:
What is missing to set this up? |
I can confirm I am having the exact same issue on iOS. Any ideas as to what may be the cause?
I work off the develop fork and I thought there may have been a problem based on the age of this thread, but it turns out as usual the problem was me ... lol. |
Hum... maybe try this. Open up a command line window and enter:
This should come back and tell you that the environment variable is not defined. If not do:
Which will clear it. The latest .target file deals with this and keeps it from happening, but maybe you are working from an older version. |
I don't think it's defined on my machine:
I tried updating the latest .target file, and my source control says it's the same file. |
Do you see...
... in the build output? That is printed from the .targets file if the platform is properly set. Also maybe be sure the content assemblies are not blocked from execution (Properties -> Unblock). |
I checked, those DLLs aren't blocked. I raised the MSBuild log level in VS, and I see it:
|
You do not need to elevate the log level. What you wrote there is different. This...
... is not this...
That text specifically comes from a If you do not see that line as I wrote it, that means the target is not executing and the content processor will not see the platform identifier and will build stock XNA content. |
Mr. Peppers, are you using Ray's old skeleton content builder, or the new MonoGame content builder? |
I'm using the content builder in here: https://github.com/mono/MonoGame/tree/develop/MonoGame.ContentPipeline Should I be using the newer one now? Is there a working example I can compare my project to? |
Try this one: MonoGame\Tools\MGCB Otherwise, you could use our content builder at: https://github.com/Cocos2DXNA/cocos2d-xna/tree/master/tests/iOSContent/ContentBuilder The stock content pipeline project you are using, I found, did not always select iOS correctly, so I shamelessly hacked it to always do iOS for Cocos2d-XNA and our games. @dellis1972 might have something for you on the iOS content builder frontier. He's been deep into that side lately. |
Here is @dellis1972 work: You could merge this into your local and I bet you would be able to continue with the content build on iOS. |
Thanks @totallyeviljake, Because of a time crunch, we ended up using this hack method for fonts: http://kelthar.wordpress.com/2010/09/04/loading-spritefonts-faster-with-xnatouch/ Of course I cleaned it up, it was a little rough. We've been using this since about MonoGame 2.5, but I'm not a fan because it requires making SpriteFont's constructor public. I'll mess with your examples and see if I can figure out what we're doing wrong. |
Ok, for future reference:
When it wasn't working for me, I had everything in the content project and nothing special setup in the main XNA project. Is there a way we could make a supported MonoGame project template for this stuff? Or is it because the pipeline is getting rewritten, that this stuff will be deprecated one day anyway? |
You don't need to do that... it only needs to go in the XNA main project. It is weird... but the XNA content project never really compiles. The XNA main project is what actually does the content building and that is why
Technically there is one, but it is a stand alone content project without a game associated to it. I can see about getting a content project in the default templates for at least the Windows desktop platforms. |
Ok, great, nice to know. You can probably resolve this issue. But I bet a lot of people will have trouble with it. How long until all the XNA pipeline will be dropped completely? We can maybe put some time toward helping with that. |
Hard to say. The big holes still left:
We can always use help. You should probably sync up with us on what area you want to help with as someone else may be working on it too. |
It looks like the Autodesk SDK supports Windows mac and linux for FBX loading support. http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=10775847 Is that the solution you were hoping to use? I know its pretty heavy i think it comes over at something like 8mb compiled. Are there any other cross platform FBX solutions out there? I have a variant of the example fbx loader compiled that I use to load fbx files on the fly in my monogame level editor. |
The issue isn't finding a loader to use. We're using AssImp which supports a bunch of import formats including FBX. The issue is translating the loaded data into the correct XNA content objects and doing the processing on them. We have done some work there and we can load simple meshes, but we don't have full material support and don't have any support of animation data. |
If i remember correctly XNA only support animations on skeletal meshes? I believe it was a 3rd party codeplex extention for normal object animation? |
Yes, but we still have to import the data and provide it in the various content objects to the processors. |
This is so old, it should be closed. |
See full details here: http://stackoverflow.com/questions/18857318/monogame-spritefont-not-working-on-ios
Basically I'm having trouble getting a basic *.spritefont to load on iOS when built properly from the MonoGame content pipeline. "MonoGame SpriteFont from Texture" works fine, but it is difficult to use these for non-Latin languages.
Is this currently supposed to be working?
The text was updated successfully, but these errors were encountered: