shaping: a VS16 inside a keycap sequence breaks the keycap ligature #30
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A keycap emoji (
#️⃣,1️⃣) draws as three glyphs instead of one: the base, a.notdef, and the enclosing keycap. Since #29 the cluster is fitted into its two cells, so it stays inside them but comes out much smaller than kitty or WezTerm draw it.Cause: swash maps a VS16 that sits inside the sequence to
.notdefand gives it a full advance. The.notdefbreaks the font's keycap ligature. Shaped against the pinned Noto Color Emoji at 18 px:#U+20E3(1482, 22.4): one keycap glyph#U+FE0F U+20E3(4, 22.4),(0, 22.4),(21, 22.4)1U+20E3(1485, 22.4)❤U+FE0F,☺U+FE0F,😀U+FE0FA trailing VS16 is absorbed. Only a selector followed by more of the cluster breaks, and the keycap sequence is the common case. HarfBuzz treats a default-ignorable code point the face does not map as invisible: lookups skip it and it gets no advance. That is why the other terminals ligate keycaps.
Fix direction:
#️⃣against the pinned emoji face and expect one glyph, and a fitted keycap should no longer be needed (fit_px == 0in two cells).Related: #14 (which face an emoji-presentation character resolves to) is a separate question. This issue is about what the resolved face is given to shape.