Skip to content

Add sextant glyph support to terminal rendering - #51072

Merged
SomeoneToIgnore merged 6 commits into
zed-industries:mainfrom
mchisolm0:fix-terminal-qr-code
Jul 25, 2026
Merged

SomeoneToIgnore merged 6 commits into
zed-industries:mainfrom
mchisolm0:fix-terminal-qr-code

Conversation

@mchisolm0

@mchisolm0 mchisolm0 commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

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
Zed Nightly Zed dev build Ghostty

Other notes

Current Fallback QR Code for SDK 54 and 56 Fallback with this PR
SCR-20260622-jwco SCR-20260622-kfjh

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
image image

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

btop with tty graph before change btop with tty graph after change
SCR-20260724-irpr-2 SCR-20260724-ises-2

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:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

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

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Mar 9, 2026
@mchisolm0

mchisolm0 commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator Author

I have verified the changes fix the broken QR code. I still need to look closer at the changes after some sleep, so it is still a draft.

Screenshot of QR code workingCleanShot 2026-03-08 at 23 24 04@2x

Steps to verify fix

  1. Start a new Expo app with SDK 55 using npx create-expo-app@latest --template default@sdk-55 or bun create expo-app --template default@sdk-55
  2. Checkout this branch
  3. Run cargo run [app-dir-from-step-1]
  4. Run npm run start or bun run start in the Zed integrated terminal
  5. Scroll to see where the QR code is (should render correctly)

@maxdeviant maxdeviant changed the title Add sextant glyph support to terminal rendering (used Codex) Add sextant glyph support to terminal rendering Mar 9, 2026
@mchisolm0

This comment was marked as duplicate.

@mchisolm0

mchisolm0 commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator Author

Performance

Histogram of performance between sextant glyphs and mainsextant-glyphs vs main

Security

I cannot think of a place in the PR that would be a security concern. Please let me know if there is one.

@mchisolm0
mchisolm0 marked this pull request as ready for review March 10, 2026 06:02
@zelenenka zelenenka added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 16, 2026
@2manslkh

Copy link
Copy Markdown

Please fix this thank you!

- Introduce SextantGlyph type and painting logic
- Extend layout_grid to return sextant_glyphs
- Propagate sextant_glyphs through call sites
- Implement sextant_char_to_packed and bit-reversal helpers
- Render sextant glyphs after text runs in TerminalOutput
- Add tests for sextant packing and decorative range boundaries
@mchisolm0
mchisolm0 force-pushed the fix-terminal-qr-code branch from 38c9ae7 to 8922ab7 Compare June 3, 2026 21:10
@mchisolm0

Copy link
Copy Markdown
Collaborator Author

I believe I understood the changes @/benbrandt made in #57483 to now use a neutral terminal backend and updated the addition of sextant glyphs for Expo SDK 55+ QR codes correctly. Just wanted to mention it for context.

- Rename SextantGlyph to BlockElementLayoutRect
- Update layout to use block element rects
- Add collect_block_element_regions and block_element_regions_to_rects
- Update tests for merging adjacent full blocks and mixed regions
@mchisolm0

mchisolm0 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

I have updated the PR description to reflect the most recent changes I've made. The first fix left gaps in the seams of the QR code. If this is not the direction the Zed team wants to go, I am happy to close this PR and go a different direction.

@smitbarmase smitbarmase added the area:integrations/terminal Feedback for terminal integration, shell commands, etc label Jun 29, 2026
@SomeoneToIgnore

Copy link
Copy Markdown
Contributor

Sorry, slowly trying to reproduce the root issue.
For me, seems that expo in its latest versions exposes no issues anymore and both the PR and the issue could be closed?

image

@mchisolm0

Copy link
Copy Markdown
Collaborator Author

@SomeoneToIgnore Thanks for checking. You are right that we no longer see the issue reported in #50158 because expo has made an exception for Zed to fallback to the old QR code rather than their new sextant based QR code. This PR does fix the sextant QR code if expo decides to bring it back for Zed in the future.

Also, it seems this PR fixes other issues with glyphs in the integrated terminal like in #58830 where some fonts render gaps in TUIs like Opencode.

Monaco before change Monaco after change
image image

Based on #17904 and #27559, the Zed team seems to prefer these are fixed with line_height set to a custom value.

"terminal": {
    "line_height": {
      "custom": 1.3
    },
    "font_family": "PT Mono"
  }

If that is the preference and you feel expo falling back to the old QR code method is sufficient then I agree we can close this PR.

Examples

Before Change After Change
Sextant QR code (SDK 55) image image
Old QR code w/ Monaco (SDK 57) image image
Open code w/ Monaco image image

@SomeoneToIgnore

Copy link
Copy Markdown
Contributor

In that case, I found it quite odd that we did not support a better range of symbols — pushed that into the PR along with the drive-by fix for the quadratic merge_background_regions when pushing regions for █.

Can you check that my changes make sense?
Anything else you would have wanted to push in that direction?

@mchisolm0

Copy link
Copy Markdown
Collaborator Author

Thank you for the changes. It took me a bit to wrap my head around them, but now I think it's much easier to understand how the characters end up mapping to the terminal subcells. I think the added symbols are good and avoiding unnecessary calls to merge_background_regions is a great catch.

I don't think there is anything I want to add to this PR. I found some other problems with glyphs and powerlines as mentioned #51310, but I think that would be a separate PR if the team decides to implement the suggestions. It does look like this PR addresses some of the initial requests in the feature request, though.

I have updated the PR description to reflect the new changes. I asked if the author of #56342 agrees this fixes their main concern or if they were requesting every Unicode in that range be handled.

Unless you need anything else, I am happy for you to merge this.

Comment thread crates/terminal_view/src/terminal_element.rs

@SomeoneToIgnore SomeoneToIgnore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you a lot for confirming!

@SomeoneToIgnore
SomeoneToIgnore added this pull request to the merge queue Jul 25, 2026
Merged via the queue into zed-industries:main with commit c2a610f Jul 25, 2026
36 checks passed
0arm pushed a commit to 0arm/zed that referenced this pull request Jul 26, 2026
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 expo/expo#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 zed-industries#50158
Closes zed-industries#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>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
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 expo/expo#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 zed-industries#50158
Closes zed-industries#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>
kitten added a commit to expo/expo that referenced this pull request Aug 10, 2026
# Why

Zed's integrated terminal had malformed QR codes with some fonts that
became more obvious with Expo's new sextant based QR code rendering. The
sextant QR code rendering was disabled in
#46148 but now Zed handles the sextant
range needed for the new QR code rendering with the changes from
zed-industries/zed#51072.

This PR removes the check that gated against Zed rendering the sextant
QR code.

# How

I removed the changes made by @/kitten in
https://github.com/expo/expo/pull/46148/changes.

# Test Plan

Added the following to my `.zshrc` as the docs say
```
# expo custom build
alias nexpo="/path/to/project/expo/packages/@expo/cli/bin/cli.js"
alias expo-inspect="node --inspect /path/to/project/expo/packages/@expo/cli/bin/cli.js"
```

1. Build the custom cli based on the instructions in the README.md
2. Open an Expo SDK 55+ app in Zed with Monaco font for the terminal (a
font that use to show the regression)
3. Open the Zed integrated terminal
4. Run `npx expo start`
5. Observe the current release falls back to the non-sextant QR code
rendering
6. Run `nexpo start`
7. Observe the QR code is now using sextant rendering

| Zed Integrated Terminal w/ fallback QR code | Zed Integrated Terminal
w/ sextant QR code |
| --- | --- |
| <img width="1512" height="982" alt="SCR-20260731-kiyk-2"
src="https://github.com/user-attachments/assets/b297c93c-24f2-43cd-b5e8-7f36ca19bf88"
/> | <img width="1512" height="982" alt="SCR-20260731-kipj-2"
src="https://github.com/user-attachments/assets/f913a7e9-d9e6-4b8f-bc76-6f7516d7ce90"
/> |

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)

---------

Co-authored-by: Phil Pluckthun <phil@kitten.sh>
kitten added a commit to expo/expo that referenced this pull request Aug 10, 2026
Zed's integrated terminal had malformed QR codes with some fonts that
became more obvious with Expo's new sextant based QR code rendering. The
sextant QR code rendering was disabled in
#46148 but now Zed handles the sextant
range needed for the new QR code rendering with the changes from
zed-industries/zed#51072.

This PR removes the check that gated against Zed rendering the sextant
QR code.

I removed the changes made by @/kitten in
https://github.com/expo/expo/pull/46148/changes.

Added the following to my `.zshrc` as the docs say
```
alias nexpo="/path/to/project/expo/packages/@expo/cli/bin/cli.js"
alias expo-inspect="node --inspect /path/to/project/expo/packages/@expo/cli/bin/cli.js"
```

1. Build the custom cli based on the instructions in the README.md
2. Open an Expo SDK 55+ app in Zed with Monaco font for the terminal (a
font that use to show the regression)
3. Open the Zed integrated terminal
4. Run `npx expo start`
5. Observe the current release falls back to the non-sextant QR code
rendering
6. Run `nexpo start`
7. Observe the QR code is now using sextant rendering

| Zed Integrated Terminal w/ fallback QR code | Zed Integrated Terminal
w/ sextant QR code |
| --- | --- |
| <img width="1512" height="982" alt="SCR-20260731-kiyk-2"
src="https://github.com/user-attachments/assets/b297c93c-24f2-43cd-b5e8-7f36ca19bf88"
/> | <img width="1512" height="982" alt="SCR-20260731-kipj-2"
src="https://github.com/user-attachments/assets/f913a7e9-d9e6-4b8f-bc76-6f7516d7ce90"
/> |

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)

---------

Co-authored-by: Phil Pluckthun <phil@kitten.sh>
kitten added a commit to expo/expo that referenced this pull request Aug 10, 2026
Zed's integrated terminal had malformed QR codes with some fonts that
became more obvious with Expo's new sextant based QR code rendering. The
sextant QR code rendering was disabled in
#46148 but now Zed handles the sextant
range needed for the new QR code rendering with the changes from
zed-industries/zed#51072.

This PR removes the check that gated against Zed rendering the sextant
QR code.

I removed the changes made by @/kitten in
https://github.com/expo/expo/pull/46148/changes.

Added the following to my `.zshrc` as the docs say
```
alias nexpo="/path/to/project/expo/packages/@expo/cli/bin/cli.js"
alias expo-inspect="node --inspect /path/to/project/expo/packages/@expo/cli/bin/cli.js"
```

1. Build the custom cli based on the instructions in the README.md
2. Open an Expo SDK 55+ app in Zed with Monaco font for the terminal (a
font that use to show the regression)
3. Open the Zed integrated terminal
4. Run `npx expo start`
5. Observe the current release falls back to the non-sextant QR code
rendering
6. Run `nexpo start`
7. Observe the QR code is now using sextant rendering

| Zed Integrated Terminal w/ fallback QR code | Zed Integrated Terminal
w/ sextant QR code |
| --- | --- |
| <img width="1512" height="982" alt="SCR-20260731-kiyk-2"
src="https://github.com/user-attachments/assets/b297c93c-24f2-43cd-b5e8-7f36ca19bf88"
/> | <img width="1512" height="982" alt="SCR-20260731-kipj-2"
src="https://github.com/user-attachments/assets/f913a7e9-d9e6-4b8f-bc76-6f7516d7ce90"
/> |

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)

---------

Co-authored-by: Phil Pluckthun <phil@kitten.sh>
KevinvdBurg pushed a commit to KevinvdBurg/expo that referenced this pull request Aug 11, 2026
# Why

Zed's integrated terminal had malformed QR codes with some fonts that
became more obvious with Expo's new sextant based QR code rendering. The
sextant QR code rendering was disabled in
expo#46148 but now Zed handles the sextant
range needed for the new QR code rendering with the changes from
zed-industries/zed#51072.

This PR removes the check that gated against Zed rendering the sextant
QR code.

# How

I removed the changes made by @/kitten in
https://github.com/expo/expo/pull/46148/changes.

# Test Plan

Added the following to my `.zshrc` as the docs say
```
# expo custom build
alias nexpo="/path/to/project/expo/packages/@expo/cli/bin/cli.js"
alias expo-inspect="node --inspect /path/to/project/expo/packages/@expo/cli/bin/cli.js"
```

1. Build the custom cli based on the instructions in the README.md
2. Open an Expo SDK 55+ app in Zed with Monaco font for the terminal (a
font that use to show the regression)
3. Open the Zed integrated terminal
4. Run `npx expo start`
5. Observe the current release falls back to the non-sextant QR code
rendering
6. Run `nexpo start`
7. Observe the QR code is now using sextant rendering

| Zed Integrated Terminal w/ fallback QR code | Zed Integrated Terminal
w/ sextant QR code |
| --- | --- |
| <img width="1512" height="982" alt="SCR-20260731-kiyk-2"
src="https://github.com/user-attachments/assets/b297c93c-24f2-43cd-b5e8-7f36ca19bf88"
/> | <img width="1512" height="982" alt="SCR-20260731-kipj-2"
src="https://github.com/user-attachments/assets/f913a7e9-d9e6-4b8f-bc76-6f7516d7ce90"
/> |

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
-->

- [x] I added a `changelog.md` entry and rebuilt the package sources
according to [this short
guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)

---------

Co-authored-by: Phil Pluckthun <phil@kitten.sh>
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
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 expo/expo#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 zed-industries#50158
Closes zed-industries#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:integrations/terminal Feedback for terminal integration, shell commands, etc cla-signed The user has signed the Contributor License Agreement guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zed terminal TUI font rendering issue QR Code/Unicode formatting broken in the Terminal

6 participants