×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    9

    SpriteFont XNA áéíóúñ Error

    Hi, im using a spritefont on my app, and the text that i'm going to show it's on spanish so it may have the characters áéíóúñ.
    When i try to draw the spritefont i got this error:

    "The character 'í' (0x00ed) is not available in this SpriteFont. If applicable, adjust the font's start and end CharacterRegions to include this character.
    Parameter name: character"

    I tried changing the range on the sprite font like this:
    <CharacterRegions>
    <CharacterRegion>
    <Start> </Start>
    <End>&#165;</End>
    </CharacterRegion>
    </CharacterRegions>

    But i'm still having the same error.

    Thanks for your time.

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: SpriteFont XNA áéíóúñ Error

    Well a couple of things i see that are wrong in your code
    1. you didnt gave a starting character number
    2. 0x00ed is 237 in decimal which 165 is lower than (the values in the Start and End keys are in decimal values of the character unicode value)

    my suggestion is to do something like this

    <Start> </Start>
    <End>&#255;</End>
    This covers all the visible ASCII characters
    If you need to add other characters then you can add multiple <CharacterRegion> like this
    <CharacterRegion>
    <Start> </Start>
    <End>&#255;</End>
    </CharacterRegion>
    <CharacterRegion>
    <Start>ƒ</Start>
    <End>ƒ</End>
    </CharacterRegion>

  3. #3
    Registered User
    Join Date
    May 2013
    Posts
    9

    Re: SpriteFont XNA áéíóúñ Error

    jaja i dont know how i pasted it wrong, but i had the start region like this
    <Start> </Start>

    well, the problem was solved adding another region like hits:

    <CharacterRegions>
    <CharacterRegion>
    <Start> </Start>
    <End>&#126;</End>
    </CharacterRegion>
    <CharacterRegion>
    <Start>&#xC0;</Start>
    <End>&#x2A8;</End>
    </CharacterRegion>
    </CharacterRegions>

  4. #4
    Registered User
    Join Date
    May 2013
    Posts
    9

    Re: SpriteFont XNA áéíóúñ Error

    jaja <Start> & # 32;</Start> somehow is getting interpreted on the forum page

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    574

    Re: SpriteFont XNA áéíóúñ Error

    Quote Originally Posted by aaike64 View Post
    jaja <Start> & # 32;</Start> somehow is getting interpreted on the forum page
    When you're entering code in a forum post, click on "Go Advanced", highlight your code and press the # button. That should help.

Similar Threads

  1. Fatal: IO Error:SymbainOS error = -34 : General: System error
    By dharmeshkhatri in forum Mobile Java Networking & Messaging & Security
    Replies: 9
    Last Post: 2010-04-12, 15:17
  2. Replies: 1
    Last Post: 2008-06-05, 07:44
  3. Replies: 4
    Last Post: 2007-05-31, 07:06
  4. Replies: 5
    Last Post: 2006-09-29, 02:05
  5. error creating graphic context: error C2065:'SystemGc' : undeclared identifier
    By ThreeSixFiveOh in forum Symbian User Interface
    Replies: 4
    Last Post: 2003-11-18, 12:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×