I am using MonoGame to port my XNA Windows Phone app to iPhone. All is well, except that my fonts look distorted/smudged on the iPhone.
Turns out this is due to the way that MonoGame builds the content fonts. They basically let XNA compress them, then MonoGame uncompresses them and re-compresses them again in PVRTC, causing the distortion. The MonoGame team is aware of that, however no solution has come out from them, yet. Other users have suggested using the Nuclex spritefont processor to bypass compression, however I am unable to do that since I get the following error on build:
Error 1 Building content threw Exception: Font could not be found
at Nuclex.Fonts.Content.FreeTypeManager.OpenWindowsFont(String searchedFaceName, FontDescriptionStyle style)
at Nuclex.Fonts.Content.FreeTypeManager.OpenFont(String pathOrFaceName, FontDescriptionStyle style)
at Nuclex.Fonts.Content.FreeTypeFontProcessor..ctor(FontDescription fontDescription, FontHinter hinter)
at Nuclex.Fonts.Content.NuclexSpriteFontDescriptionProcessor.Process(FontDescription input, ContentProcessorContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentProcessor`2.Microsoft.Xna.Framework.Content.Pipeline.IContentProcessor.Process(Object input, ContentProcessorContext context)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings) c:\users\ramsay\documents\visual studio 2010\Projects\MonogameContent\MonogameContent\MonogameContentContent\BoldFont.spritefont MonogameContent
The author of the Nuclex framework explains the error]
There's no well-defined API for looking up the font names in Windows, so I'm checking the names embedded in the *.ttf files in the Fonts directory to find "Courier New" with the appropriate style flags.
So am now I have no idea how to fix this problem, and am looking for any advice. It's impossible to release an app with all the text looking smudged. However other MonoGame iOS apps are out there with undistorted text, so I am sure there is a solution, but I could not find it anywhere.
C:\Windows\Fonts\Calibri.ttf
(whereas, say, Calibri Bold iscalibrib.ttf
). Of course, it's worth pointing out that you probably don't have a licence to redistribute the Calibri font, even as a bitmap font. \$\endgroup\$