Text contains characters that cannot be resolved by this SpriteFont

Posted by Appeltaart on Game Development See other posts from Game Development or by Appeltaart
Published on 2014-04-28T17:35:50Z Indexed on 2014/05/29 22:06 UTC
Read the original article Hit count: 422

Filed under:
|
|

I'm trying to draw currency symbols in an Arial Spritefont. According to thissite, the font contains these symbols. I've included the Unicode character region for these symbols in the Content Processor SpriteFont file, like so:

<CharacterRegions>
  <CharacterRegion>
    <Start>&#32;</Start>
    <End>&#126;</End>
  </CharacterRegion>
  <CharacterRegion>
    <!-- Currency symbols -->
    <Start>&#8352;</Start>
    <End>&#8378;</End>
  </CharacterRegion>
</CharacterRegions>

However, whenever I try to draw a € (Euro) symbol, I get this exception:

Text contains characters that cannot be resolved by this SpriteFont

Inspecting the SpriteFont in the IDE at that breakpoint shows the € symbol is in there. I'm at a loss at what could be wrong. Why is this exception thrown?

© Game Development or respective owner

Related posts about XNA

Related posts about monogame