Pregunta

¿Hay alguna forma de usar fuentes personalizadas en XNA?

¿Fue útil?

Solución

Claro, debe importar la fuente a su sistema.Agregue la fuente al catálogo del sistema de fuente o agregue el panel de control.Cuando esté listo (reiniciar Visual Studio), use la plantilla personalizada para SpriteFont en Visual Studio, que genera un archivo XML.Un exmaple:

<?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 bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top