# gpui: Fix web fallback for text-default emoji \(\#64319\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/87f65de697bda93ad0a13dc92eabe941115b61de)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 87f65de697bda93ad0a13dc92eabe941115b61de

Requested commit: 87f65de697bda93ad0a13dc92eabe941115b61de

Commit: 87f65de697bda93ad0a13dc92eabe941115b61de

Tree: 67644be83142e819bc1210037380a08ddce7143f

Author: Max Brunsfeld

Committer: GitHub

## Message

```
gpui: Fix web fallback for text-default emoji (#64319)

## Objective

Fix missing characters in GPUI's web renderer for emoji-capable symbols
that default to text presentation, such as repeated bare spider webs
(`🕸🕸🕸`). The default Canvas policy previously rejected these symbols
before checking whether bundled fonts could render them.

## Solution

Separate emoji eligibility from presentation. Emoji-capable graphemes
can now use Canvas when their glyph is missing, while existing bundled
text glyphs remain native and explicit text/emoji presentation remains
intact. CJK fallback remains opt-in.

Add regression coverage for repeated spider webs and mixed bare, VS15,
and VS16 sequences, including every glyph's source index and
presentation, missing-glyph reports, copy preservation, and raster-cache
reuse.

## Testing

- `cargo test -p gpui_web --lib`: all 19 tests passed.
- `cargo fmt -p gpui_web -- --check`, example Rust formatting, and `git
diff --check`: passed.
- `trunk build` in `crates/gpui_web/examples/hello_web`: passed.
- Headless Chrome on macOS: browser regression failed against the old
implementation and passed with the fix. Inspected the resulting
screenshot; all mixed-presentation spider webs render.
- Firefox, Safari, and other operating systems have not been exercised.

To run the browser workflow, serve the gallery with `trunk serve` from
`crates/gpui_web/examples/hello_web`, then run `node
crates/gpui_web/examples/hello_web/test_canvas_fallback.mjs
http://127.0.0.1:8080` from the repository root.

Release Notes:

- [GPUI] Fixed missing text-default emoji, including spider-web symbols,
in GPUI's web renderer.
```

## Parents

- [395fbd11b851046ea8cdc747e5a088823a81a205](https://git.cafe/gitcafe/zed/commit/395fbd11b851046ea8cdc747e5a088823a81a205?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/87f65de697bda93ad0a13dc92eabe941115b61de?format=markdown)
