Saeki Amae Posted August 14, 2020 Share Posted August 14, 2020 (edited) Hello, when i try to use PIXI.bitmapFont.from() with Unicode Suplementary characters (those > U+10000 - those requiring 4 bytes instead of two) those characters are displayed as missing. How to fix that ? Thank you for help! Edited August 14, 2020 by Saeki Amae Quote Link to comment Share on other sites More sharing options...
b10b Posted August 14, 2020 Share Posted August 14, 2020 Does your web font include those characters and is it loaded? Quote Link to comment Share on other sites More sharing options...
Saeki Amae Posted August 14, 2020 Author Share Posted August 14, 2020 (edited) In PIXI.bitmapFont() arguments I provide which char sets I want to use. When I used this font in casual PIXI.Text there was no problem. No character from extended ones displays corrently - i use Ubuntu font as example. It seems it treats them like separate characters - so instead of one character it writes two (probably unicode surrogates). Each of characters looks same - inverted square with question mark inside (not empty square that often means missing char in font) Someone in the forum told me that this function is available only in the very last version of pixi 5 - maybe this function only supports 16-bit characters? Edited August 14, 2020 by Saeki Amae Quote Link to comment Share on other sites More sharing options...
codingchili Posted March 6, 2021 Share Posted March 6, 2021 Ahoy, I have the same issue. Just upgraded to v6.0.0 to try the new BitmapFont. Emojis works fine with PIXI.Text though. I'll have to stick with PIXI.Text until BitmapFont supports "more" emojis. I did notice quite a difference in performance but I need those sweet emojis. PIXI.BitmapFont.from("TitleFont", style, { chars: [ ['a', 'z'], ['0', '9'], ['A', 'Z'], ' .!?♥??', ] }); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.