How to display Spanish characters in C# XNA

189 views Asked by At

I'm trying to display the below spanish text, but it keeps throwing error. After researching I found that I need to add it to spriteFont, but I'm not sure what to add on < Start> and < End>

¿Te gustaría jugar un juego?

Error: The character '�' (0xfffd) is not available in this SpriteFont. If applicable, adjust the font's start and end CharacterRegions to include this character.

SpriteFont1.spritefont:

  <CharacterRegion>
    <Start>&#191;</Start>
    <End></End>
  </CharacterRegion>
1

There are 1 answers

0
AudioBubble On

Include a single CharacterRegion in your spriteFont file: This range includes all uppercase letters, numbers, lowercase letters, the lower case acute accents, the ¿ and the inverted !. for the uppercase accents you have to change the 173 to 233.

Make sure your font file has the glyphs for these characters.

<CharacterRegion>
  <Start>&#32;</Start>
  <End>&#173</End>
 </CharacterRegion>