Emojis are not rendering
See original GitHub issueEnglish characters render, but emojis don’t. I have loaded a font with emojis.
Issue details
https://stackoverflow.com/questions/58635857/how-to-render-an-emoji-with-libgdx
Reproduction steps/code
FileHandle fontFile = Gdx.files.internal("path/to/file.ttf");
FreeTypeFontGenerator g = new FreeTypeFontGenerator(fontFile);
FreeTypeFontGenerator.FreeTypeFontParameter p = new FreeTypeFontGenerator.FreeTypeFontParameter();
// Some config here with p
BitmapFont emojiFont= g.generateFont(p);
public static void renderFont(SpriteBatch sb, BitmapFont font, String msg, float x, float y, Color c) {
font.setColor(c);
font.draw(sb, msg, x, y);
}
String str = "emoji ❤ \uD83D\uDC49 test \uD83D\uDC49 \uD83D\uDC4D test \uD83D\uDE03"
renderFont(sb, emojiFont, str, x, y, new Color(-597249));
Version of LibGDX and/or relevant dependencies
1.9.2
Please select the affected platforms
- [ x] Windows
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (5 by maintainers)
Top Results From Across the Web
Html character emoji does not render - Stack Overflow
The rendering of the emojis is depending on the font you use to display them. Emojis are just normal characters like the letter...
Read more >Emojis are not rendering, even with emojify : r/emacs - Reddit
Emojis are not rendering, even with emojify. I just reinstalled archlinux on to this device, so I had to reinstall emacs as well....
Read more >Emoji not displaying | WordPress.org
Hey, So the issue is with your customizer not saving. If you've tried deactivating all plugins and using a default theme, then it's...
Read more >Emojis not rendering - Ask Different - Apple Stack Exchange
I fixed it by copying the Apple Color Emoji font from another Mac running the same OS version. You can find it in...
Read more >Emojis Not Rendering Correctly When Published to Tableau ...
When publishing a dashboard that uses emojis to Tableau Cloud, some emojis appear different or do not render successfully when compared to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
would be nice add point code support for font and label. when i try add code point (int type) to font i get error
BitmapFontData bitmapFontData = new BitmapFontData(); bitmapFontData.setGlyph(0x1F60B, new Glyph());
and then we can easy to add custom emoji and stickers. for example https://github.com/taluks/libgdx-emodji
I have been doing some “experiments” on how to add Emojis to libGDX texts (Labels, BitmapFonts, etc) and have created a EmojiSupport class without having to change any file in the gdx core. https://github.com/DavidPDev/gdx-EmojiSupport Currently supports adding emojis to any text with very low penalty. Please if you can check it, it’s not 100% perfect but may be the way to supporting emojis natively.