You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed there isn't any support for colour emoji in the default font engine. In the case of freetype it'll do the work for us, we simply need to give the flag FT_LOAD_COLOR to FT_Load_Glyph and handle FT_PIXEL_MODE_BGRA. Although the FontGlyph class likely needs adjustments to accommodate the added red, green and blue. Also need to not apply any colour tinting if it's colour emoji.
The text was updated successfully, but these errors were encountered:
I went ahead and got busy with this. The result has been merged in: 25ceb70.
So, color emojis are now working! 🙌
I have tested the implementation with four different fonts, Windows' builtin Segoe, Joypixels, Noto, and Firefox. We don't include them with our samples because they are big and some of them don't have a proper license.
By the way, some color fonts, including Segoe, require FreeType 2.10+ to be shown with full colors. I also made sure that it works with font-effects. The only exception is the shadow effect which is ignored on color glyphs. Instead, you can create some nice looking drop shadows with the glow effect,
Internally, we downsize bitmap glyphs to the active font size. That way we don't require clients to use mipmap rendering which we don't have an API for now, and it also works with font effects too. Also, we still don't support modifiers / combined emojis / ligatures, so not all emojis are display correctly, for this we will need to implement #211.
Let me know how it works, and especially if there are any regressions with existing fonts.
I noticed there isn't any support for colour emoji in the default font engine. In the case of freetype it'll do the work for us, we simply need to give the flag FT_LOAD_COLOR to FT_Load_Glyph and handle FT_PIXEL_MODE_BGRA. Although the FontGlyph class likely needs adjustments to accommodate the added red, green and blue. Also need to not apply any colour tinting if it's colour emoji.
The text was updated successfully, but these errors were encountered: