Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a SpriteFont in XNA, which has the standard 126 characters that are usable.

However i would like to use the "ಠ" symbol in the game.

So is there anyway of adding just a few more symbols that the spritefont accepts?

Cheers, Randomman159

share|improve this question
add comment

1 Answer

up vote 13 down vote accepted

Modify the sprite font file. It's XML. Double click it in Visual Studio.

Towards the bottom of the default file is a the following:

<CharacterRegions>
  <CharacterRegion>
    <Start>&#32;</Start>
    <End>&#126;</End>
  </CharacterRegion>
</CharacterRegions>

Your character is unicode code point U+0CA0, which in decimal is 3232. So add another character region tag that contains it:

  <CharacterRegion>
    <Start>&#3232;</Start>
    <End>&#3232;</End>
  </CharacterRegion>

This assumes that the ಠ symbol exists in the font you are using.

share|improve this answer
1  
ahhh yes, a second region... duh, didn't think of that :P I was just trying multiple Start and End tags... –  Randomman159 Jun 24 '11 at 15:10
    
My solution was better :p –  Jonathan Connell Jun 24 '11 at 15:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.