我刚刚为 Windows Phone 安装了 Windows 8 和 Visual Studio Express 2012 ......但我不再能够编译包含 Segoe WP 类型的 spritefonts 的 XNA 项目(相同的项目确实可以使用 Visual Studio Express 2010 成功编译Windows 电话):
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<!--
Modify this string to change the font that will be imported.
-->
<FontName>Segoe WP</FontName>
<!--
Size is a float value, measured in points. Modify this value to change
the size of the font.
-->
<Size>14</Size>
...
</XnaContent>
上面的代码片段总是会产生以下构建错误:
Error 1 Building content threw NotSupportedException: Specified method is not supported.
at Microsoft.Xna.Framework.Content.Pipeline.Interop.KerningHelper.GetCharacterSpacing(Char c)
at Microsoft.Xna.Framework.Content.Pipeline.Processors.FontDescriptionProcessor.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)
如果我替换<FontName>Segoe WP</FontName>
为<FontName>Segoe UI Mono</FontName>
,则编译成功。
有没有人经历过类似的事情?有解决方法/修复吗?任何帮助将非常感激。