9 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?
Use the
font tool and set the
last char
to cover those letters. (Used 400 and it covers TONS of those types of characters)
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.
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.
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.
Make sure your html file has <meta charset = "UTF-8"/> if you get unexpected results with accents.
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.
9 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.
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 »