1
XNAでカスタムフォントを使用する方法はありますか?Windows Phone 7 - SpriteFontでTTFを使用するには?
XNAでカスタムフォントを使用する方法はありますか?Windows Phone 7 - SpriteFontでTTFを使用するには?
確かに、あなたのシステムにフォントをインポートする必要があります。フォントシステムカタログにフォントを追加するか、コントロールパネルに追加します。準備ができたら(Visual Studioを再起動します)、Visual StudioのSpriteFontのカスタムテンプレートを使用して、XMLファイルを生成します。例:
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains an xml description of a font, and will be read by the XNA
Framework Content Pipeline. Follow the comments to customize the appearance
of the font in your game, and to change the characters which are available to draw
with.
-->
<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>Moire</FontName>
...
質問は、Windows Phone 7ではなく、PCです。 – arts777
Conent Piplineはフォントをフェッチします。それを試してみてください。問題なく構築して実行する必要があります。 –
エラー「Fonts \ PreludeFLF.ttf」に使用するインポータを自動検出できません。このファイルタイプを処理するインポータはありません。プロジェクトでこのファイルタイプを処理するインポータを指定します。 \t C:¥src¥c#¥wp7-count-game¥Numbers¥NumbersLibContent¥Fonts¥PreludeFLF.ttf \t NumbersLib – arts777