mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
The V2 line-breaker used `lineAscent` as both the line height and the baseline offset, then inflated it to each inline emoji/image's full visual size and bottom-aligned the attachment on that inflated baseline. A 24pt emoji on a ~17pt line therefore doubled the line height and shoved the text baseline (and all text on the line) down. Stop inflating the line for emoji/images (only formulas, which carry their own metrics, still grow it) and center each attachment on the font line box at `baselineY - fontLineHeight/2 - size/2`, matching V1 `layoutTextItemWithString` and the chat `InteractiveTextComponent`. The attachment now bleeds symmetrically instead of moving the baseline. `extraDescent` absorbs tall-attachment bottom overflow so the next line is not overlapped, and the streaming-reveal `characterRect` is centered in lockstep so the reveal mask tracks the cell (reveal cost stays width-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Sources | ||
| BUILD | ||