Pergunta

Existe alguma maneira de usar fontes personalizadas no XNA?

Foi útil?

Solução

Com certeza, você precisará importar o tipo de letra para o seu sistema.Adicionar o tipo de letra para o tipo de letra do sistema de catálogo ou adicione através do painel de controle.Quando estiver pronto (reiniciar o Visual Studio) utilizar o modelo personalizado para SpriteFont no Visual studio, o que gera um arquivo XML.Um exemplo:

<?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>
...
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top