sven-n / MuMain

76 stars 72 forks source link

Rendering colored emojis #15

Open sven-n opened 11 months ago

sven-n commented 11 months ago

For text rendering, see CUIRenderTextOriginal::RenderText. Currently, emojis are only rendered in one color.

To draw colored emojis we'd need to draw a group of them on a texture bitmap (e.g. 16x16 emojis each 32x32 pixels) using direct2d, or by providing an already rendered bitmap. It would be great to have some on-demand mechanism to create new textures if previously unrendered emojis are requested, so the first option might be more suitable.

As we have .NET available, it could also be possible to manage emojis in the .NET world. There are some nice libraries which could help us there, e.g. https://github.com/SixLabors/ImageSharp.Drawing/discussions/268