Skip to content

Fix missing comma in emoji.txt between 🪉 and 🎻#298

Open
festeh wants to merge 1 commit intodesktop-app:masterfrom
festeh:fix-emoji-txt-missing-comma
Open

Fix missing comma in emoji.txt between 🪉 and 🎻#298
festeh wants to merge 1 commit intodesktop-app:masterfrom
festeh:fix-emoji-txt-missing-comma

Conversation

@festeh
Copy link
Copy Markdown

@festeh festeh commented Apr 25, 2026

Summary

emoji.txt line 696 (the section-1 replacement for the activities category) is missing a comma between the harp 🪉 and the violin 🎻 entries:

"🪕","🪉""🎻","🪈"

Fix

Add the missing comma.

Section 1's replacement for the activities category was missing a comma
between the 🪉 (harp) and 🎻 (violin) entries:

    "🪕","🪉""🎻","🪈"

ReadString in codegen/codegen/emoji/data_read.cpp tolerates this by
taking only the first quoted token per comma-separated chunk, so 🎻 is
silently dropped from the activities part. The emoji is still picked up
from the "other" section at the end of the file, but that means it
ends up in a different sprite/cell from where the picker entry suggests.

Restore the comma so 🎻 is kept in the activities replacement.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 25, 2026

CLA assistant check
All committers have signed the CLA.

festeh added a commit to festeh/telega2 that referenced this pull request Apr 25, 2026
Replace the per-PNG emoji bundle (3700 files, 37 MB) with the 8 WEBP
atlases vendored from desktop-app/lib_ui. A new build-time codegen
parses emoji.txt and emits emoji_catalog.g.dart — a const map from the
canonical (FE0F-stripped) emoji string to a (sprite, row, col) tile.
TelegramEmojiWidget paints the tile via canvas.drawImageRect, so a
chat-load no longer touches disk for emoji rendering.

The tokenizer in emoji_utils now greedy-matches against the catalog,
so ZWJ family sequences and skin-toned hands resolve as a single tile
instead of splitting into pieces. Catalog misses and atlas decode
failures are surfaced through AppLogger so silent-render bugs don't
recur.

The codegen mirrors lib_ui/codegen's strict ReadString — it takes only
the first quoted token per comma-separated chunk, which silently drops
the second value when emoji.txt has a missing-comma typo (currently
🪉""🎻 in the activities replacement). This keeps our atlas indexing
aligned with the shipped WEBPs even before the upstream typo is fixed
(PR opened at desktop-app/lib_ui#298).

Bundle size: 37 MB → 8.8 MB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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