Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

8 years ago by ibab

When drawing text, I noticed that nothing gets drawn if the text contains ä or ö.
Is there a way to include these letters?

8 years ago by AndrewMast

Use the font tool and set the last char to cover those letters. (Used 400 and it covers TONS of those types of characters)

8 years ago by AndrewMast

The char code for for ö is 246 and the char code for ä is 228, so I would set the last char parameter to around 300.

8 years ago by lunarcloud

3065 seems to be the highest "Last Char:" value accepted (one more, and it doesn't produce an image). So if you're going for really international, you should have a lot of bases covered.

8 years ago by lunarcloud

Oh, and even when It's that many characters, the PNG file is still only around 200 KB - so it's not unreasonable to include more characters if you aren't sure.

8 years ago by stahlmanDesign

Make sure your html file has <meta charset = "UTF-8"/> if you get unexpected results with accents.

8 years ago by lunarcloud

While the web page generated an image for 3065 chars, My TwoPointFive-based game (dunno if that matters) only accepted a maximum of 492 chars before the font was just rendered as black squares. Still, seems to cover a lot of characters.

8 years ago by Joncom

Quote from lunarcloud
While the web page generated an image for 3065 chars, My TwoPointFive-based game (dunno if that matters) only accepted a maximum of 492 chars before the font was just rendered as black squares. Still, seems to cover a lot of characters.
If you look at the font "png" file, does it contain a lot of these "black squares"? If so, you might have been luck rebuilding the font image with a different source font.

8 years ago by lunarcloud

No, the png includes the proper characters. I'm having the issue of mobile going all black squares and desktop showing the characters on the same font file, so I'm assuming it's an issue with loading the file into memory.
I'm using the TwoPointFive plugin (WebGL), so it may have different issues loading the font file than the purely canvas version.
Page 1 of 1
« first « previous next › last »