I have a problem using the Element of type Text when using accented character.
What I need to do is a multi-language game. There are some languages that needs special chars, like accented characters.
I’m using the font Roboto for the Font Asset. All standard characters are shown in the text, but the accented onse are not shown.
For example I want to display: “Oggi è una bella giornata”, what I see is:
“Oggi una bella giornata”
Or, another exaple, I want to display: “Alegeți răspunsurile corecte.”
But all the utf-8 chars are not shown…
Is a Playcanvas’s Text element limitation?
By default the generated characters for the font don’t include these characters. You can add them to the list of characters to be generated on the font asset here and click process font.
The reason for this is that the font is converted to a bitmap font file and more characters mean a larger texture that needs to be generated and loaded.
Thank you very mutch for your answer.
I tried to add some “special characters” to the font and click the process button: the chars are now rendered.
But now there is another problem, I cannot know whitch characters will be used in the game, because the text are loaded by backend, and filled by users.
Can I include all characters of a font?
I tried to add some ranges of font, and it worked.
The only little problem that I have is that I must know the range of the used special chars for all languages.
Yes, that’s correct. To include ALL characters supported by a font would create a large bitmap font.
Unfortunately, this is something you would have to generate yourself base on the languages that you know that you will support.
I believe if you click on ‘Latin Supplement’, that should cover most languages using the latin alphabet:
This did not work for me, when i modified my font file to include “Latin Supplement” (My game supports Spanish localization so i need é and ñ and stuff), I get an error : “Warning: The following characters were not found in the font file” then it says unicode 173. I cannot save successfully. I tried manually adding my characters and it did successfully save but then the characters did not show up in my build
Can you share the font please and example text that you want to show?
So it was a user error for my second point, when i manually added the é, ñ and á it worked! But ill leave my comment there for the first part. I sitll get that warning if I do “Latin ExtendeD”, i have to manually add the characters i need to get it to work
I would have expected that to work as shown here
Yeah i would write all this off as human error on my part except that warning. I got it all working! Just that weird warning if I use “Latin Extended”