Jump to content

BitmapFonts - Suplementary Characters

Saeki Amae

Recommended Posts

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 by Saeki Amae
Link to comment
Share on other sites

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 by Saeki Amae
Link to comment
Share on other sites

  • 6 months later...

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: [
        ' .!?♥??',
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...