Add colored emoji support on Windows (DirectWrite) - #83
Closed
eman007 wants to merge 1 commit into
Closed
Conversation
Decompose color glyph runs via IDWriteFactory2::TranslateColorGlyphRun and composite the per-color layers into an RGBA bitmap; non-color glyphs continue through the existing ClearType greyscale path. Enables colored emoji rendering on Windows. Adds the winapi dwrite_2/d2d1 feature flags required for the color APIs.
eman007
force-pushed
the
windows-color-emoji
branch
from
July 18, 2026 02:59
a22514a to
e569d14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds colored emoji (COLR) rendering to the DirectWrite backend on Windows. Color glyphs are decomposed into their per-color layers via
IDWriteFactory2::TranslateColorGlyphRunand composited into an RGBA bitmap; non-color glyphs continue through the existing ClearType greyscale path unchanged.Before this change, emoji rendered as monochrome outline glyphs on Windows. They now render in full color.
Changes
ColorFactorywrappingIDWriteFactory2, used to enumerate color glyph runs.BitmapBuffer.DWRITE_E_NOCOLOR), and honor the foreground palette index (0xFFFF).winapidwrite/dwrite_1/dwrite_2/d2d1/dcommon/unknwnbase/winerrorfeatures required for the color APIs.Testing
cargo checkbuilds clean on stable (Windows).cfg(windows)DirectWrite module.