Skip to content

chore(emoji): ship only resolver-reachable glyphs in graph-compose-emoji#220

Merged
DemchaAV merged 1 commit into
developfrom
chore/emoji-trim-payload
Jun 22, 2026
Merged

chore(emoji): ship only resolver-reachable glyphs in graph-compose-emoji#220
DemchaAV merged 1 commit into
developfrom
chore/emoji-trim-payload

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

graph-compose-emoji bundled the entire Noto Emoji SVG set — 3731 glyphs,
~40 MB — but EmojiLibrary only resolves a glyph when its codepoint is a
value in emoji-index.properties (the gemoji-mapped shortcodes, 1595
distinct). iconForCodepoint has no raw-codepoint entry point, so the other
2136 glyphs (95 % skin-tone variants 1f3fb1f3ff) are unreachable — pure
dead weight in an artifact about to ship to Maven Central.

What changed

  • Drop the 2136 SVGs no shortcode maps to. The set goes 3731 → 1595;
    emoji-index.properties is byte-identical (every value still resolves to a
    glyph, 0 missing), so resolution behaviour is unchanged. The packaged jar
    falls from ~40 MB of art to 3.7 MB.
  • emoji/tools/build-emoji-set.py now builds the index first and copies only
    set(index.values()) instead of every emoji_u*.svg, so a fresh regen
    reproduces the trimmed set directly.
  • Module stays at 1.0.0 — it has not been published yet, so this is a
    pre-publication content fix, not a re-tag.

Verification

./mvnw test -pl .BUILD SUCCESS, 1464 tests, including EmojiRenderTest
(a known shortcode paints a colour glyph; an unknown one falls back to literal
text) and EmojiLibraryTest. ./mvnw -f emoji/pom.xml -DskipTests clean install
BUILD SUCCESS, graph-compose-emoji-1.0.0.jar = 3.7 MB.

Lane: build (graph-compose-emoji) — resource-set trim + generator, no engine code change.

Independent of the other open branches.

The module bundled the full Noto Emoji set (3731 SVGs, ~40MB) but
EmojiLibrary resolves glyphs solely through emoji-index.properties, so the
2136 glyphs no shortcode maps to (mostly skin-tone variants 1f3fb-1f3ff)
were unreachable dead weight in a to-be-published Central artifact. Drop
them: 1595 reachable glyphs remain and the packaged jar falls to 3.7MB.
build-emoji-set.py now copies only set(index.values()) so a fresh
regen reproduces the trimmed set directly.

Index unchanged; EmojiRenderTest + EmojiLibraryTest green.
@DemchaAV DemchaAV merged commit 3b3390f into develop Jun 22, 2026
11 checks passed
@DemchaAV DemchaAV deleted the chore/emoji-trim-payload branch June 22, 2026 14:53
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.

1 participant