Weird spacing issues in my SpriteFont+ text

  • I'm trying to add some German characters to my SpriteFont+ sheet:

    I also made sure to modify the Character set:

    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,;:?!-_~#"'&()[]|`\/@°+=*$£€<>%äöüÄÖÜß

    Unfortunately, there's all this weird spacing and I'm not sure what's causing it! The new letters seem to be aligned with the others... The Character set seems to match up with the sprite fonts...

    I'm at a loss for an explanation. Anyone know what's going on?

  • [wrong answer deleted]

    Since you are already using SpritFont+, you need to modify width for some characters in the JSON string.

    For example:

    {""c2array"":true,""size"":[2,8,1],""data"":[[[10],[11],[12],[19],[21],[22],[23],[34]],[["" ""],[""l""],[""i""],[""j""],[""f""],[""abcegh""],[""dk""],[""m""]]]}

    First group [[10],[11],[12],[19],[21],[22],[23],[34]] are character width values.

    The second group are corresponding characters. So, for example, to make letter "i" wider, you need to increase the number [12], or move letter "i" to another group (add it to ""f"" for example).

  • Please refresh the post, I edited it while you were reading :)

  • I wish this worked for me... The end result is the same. There is always a white space to the right of German characters (vowels with umlauts).

    {""c2array"":true,""size"":[2,42,1],""data"":[[[8],[9],[11],[12],[13],[15],[16],[17],[19],[20],[21],[23],[24],[25],[26],[28],[29],[30],[31],[32],[33],[34],[35],[36],[37],[38],[39],[40],[41],[44],[45],[47],[48],[49],[51],[52],[54],[56],[58],[59],[60],[73],[0],[0],[0],[0],[0],[0],[0]],[[""Il!'""],[""i|""],[""j:""],["".""],["")""],["",(`""],["";""],[""]""],[""1[""],[""J\""""],[""t-""],[""r""],[""s?°""],[""f""],[""L*""],[""€""],[""Pk""],[""F""],[""hn""],[""Bceuvx""],[""Eapq6""],[""So28""],[""Rbdgy3/""],[""05""],[""z49<>""],[""T\\$""],[""Y+""],[""HUXZ~£""],[""DK7=""],[""_""],[""C#&""],[""m""],[""N""],[""V""],[""w""],[""AG""],[""@""],[""O""],[""Q""],[""M""],[""%""],[""W""],[""ä""],[""ö""],[""ü""],[""Ä""],[""Ö""],[""Ü""],[""ß""]]]}

  • After some experimentation I changed the value in my "size" array from 42 to 49 (to match the number of characters in my SpriteFont+ Character set):

    {""c2array"":true,""size"":[2,49,1],""data"":[[[8],[9],[11],[12],[13],[15],[16],[17],[19],[20],[21],[23],[24],[25],[26],[28],[29],[30],[31],[32],[33],[34],[35],[36],[37],[38],[39],[40],[41],[44],[45],[47],[48],[49],[51],[52],[54],[56],[58],[59],[60],[73],[48],[38],[32],[58],[58],[56],[56]],[[""Il!'""],[""i|""],[""j:""],["".""],["")""],["",(`""],["";""],[""]""],[""1[""],[""J\""""],[""t-""],[""r""],[""s?°""],[""f""],[""L*""],[""€""],[""Pk""],[""F""],[""hn""],[""Bceuvx""],[""Eapq6""],[""So28""],[""Rbdgy3/""],[""05""],[""z49<>""],[""T\\$""],[""Y+""],[""HUXZ~£""],[""DK7=""],[""_""],[""C#&""],[""m""],[""N""],[""V""],[""w""],[""AG""],[""@""],[""O""],[""Q""],[""M""],[""%""],[""W""],[""ä""],[""ö""],[""ü""],[""Ä""],[""Ö""],[""Ü""],[""ß""]]]}

    This solved my problem.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh, I don't read German, so I thought the problem was with very little space between letters like "i" and "l".

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)