Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable color emoji support in freetype #1601

Merged
merged 2 commits into from
Dec 28, 2024
Merged

Conversation

allefant
Copy link
Contributor

@allefant allefant commented Dec 5, 2024

For issue #1600, this PR adds color emoji support.

The only real change required is to add the FT_LOAD_COLOR flag to FT_Load_Glyph.

However this clashes with the no_bitmap flag, so selectively have to remove that when detecting a bitmap font. Also, for bitmap fonts, FreeType requires a call to select the size (for now we always select size 0, I have yet to find a bitmap font in TTF format with multiple sizes). Finally, our pixel copy functions needed to be made aware of FT sometimes using a 32-bit instead of 8-bit source bitmap format.

I also added an example font with color emoji (selection of some NotoColorEmoji glyphs), with appropriate license notice. And an example to use that font.

@SiegeLord SiegeLord merged commit d541a9c into liballeg:master Dec 28, 2024
1 of 3 checks passed
@SiegeLord
Copy link
Member

Lovely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants