# Add sextant glyph support to terminal rendering \(\#51072\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c2a610f7eb0aae50e2a0dd88972e7b6c9824bd7d

Requested commit: c2a610f7eb0aae50e2a0dd88972e7b6c9824bd7d

Commit: c2a610f7eb0aae50e2a0dd88972e7b6c9824bd7d

Tree: 313021ed17c7158fbc0553675ebfc3fe92d2965e

Author: Matthew Chisolm

Committer: GitHub

## Message

```
Add sextant glyph support to terminal rendering (#51072)

The Zed integrated terminal shows a broken QR code for apps with Expo
SDK 55. This PR custom-paints the terminal block and sextant glyphs used
for QR codes rather than relying on font glyphs.

| SDK 55 Before | SDK 55 After | SDK 55 in Ghostty |
| --- | --- | --- |
| <img width="581" height="536" alt="Zed Nightly"
src="https://github.com/user-attachments/assets/11054401-e947-4628-918a-0088042ccbf9"
/> | <img width="563" height="535" alt="Zed dev build"
src="https://github.com/user-attachments/assets/22e0bed3-9927-436d-8e0b-1ad0839f7bee"
/> | <img width="576" height="502" alt="Ghostty"
src="https://github.com/user-attachments/assets/c5f544d8-43e5-4dad-8bcd-8a36c401e9a7"
/> |

### Other notes
- Expo recently merged https://github.com/expo/expo/pull/46148, which
causes Expo SDK 56 to fall back to the old QR code behavior when used in
Zed. Once this PR merges, Expo can remove that fallback and use the
compact QR code path in Zed again for Expo SDK 56+.

| Current Fallback QR Code for SDK 54 and 56 | Fallback with this PR |
| -- | -- |
| <img width="744" height="684" alt="SCR-20260622-jwco"
src="https://github.com/user-attachments/assets/414896aa-52bc-4de7-a6b9-59cd5af08de0"
/> | <img width="616" height="752" alt="SCR-20260622-kfjh"
src="https://github.com/user-attachments/assets/accbef7a-3365-480f-add3-08910141afa5"
/> |

This PR now also fixes TUIs in the integrated terminal for users using
some fonts.
| OpenCode w/ Monaco before change | OpenCode w/ Monaco after change |
| --- | --- |
| <img width="1512" height="982" alt="image"
src="https://github.com/user-attachments/assets/a40f01a6-adf9-4e8b-909a-be53945eb813"
/> | <img width="1512" height="982" alt="image"
src="https://github.com/user-attachments/assets/b40bb22c-ef7e-466a-9bcf-46eb951087cd"
/> |

Finally, shade characters are now handled in the integrated terminal.

| btop with tty graph before change | btop with tty graph after change |
| --- | --- |
| <img width="1516" height="863" alt="SCR-20260724-irpr-2"
src="https://github.com/user-attachments/assets/afb77f01-6d3d-428a-b1be-7abb3d0e3d4d"
/> | <img width="1516" height="876" alt="SCR-20260724-ises-2"
src="https://github.com/user-attachments/assets/42262858-70da-4ba2-a5e6-96243fcfaadd"
/> |

#### This PR
- Adds custom painting for terminal bitmap glyphs used by QR renderers:
`█`, `▀`, `▄`, `▌`, `▐`, and U+1FB00..U+1FB3B sextants
- Adds tests for handling sextants, blocks/half-blocks, and adjacent
block merging

Closes #50158
Closes #58830 

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects
- [X] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- Fixed QR code rendering for Expo SDK 55 apps
- Fixed rendering TUIs in the integrated terminal for some users

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
```

## Parents

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

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