Add OctantCanvas#9
Open
eschnett wants to merge 14 commits into
Open
Conversation
Co-authored-by: kahliburke <399121+kahliburke@users.noreply.github.com>
…indows-display Fix silent display failure on Windows by replacing /dev/tty with stdout fallback
POSIX shm segments created for Kitty t=s transmission were never unlinked from our side — we relied on the terminal to do it. If the terminal doesn't support t=s (e.g. WezTerm misdetected as Kitty), crashes, or doesn't handle it correctly, segments leak permanently. On macOS there is no easy way to list POSIX shm segments, so leaked segments can only be cleaned up by probing known name patterns. Add two-generation tracking: segments created this frame go into _KITTY_SHM_CURRENT, promoted to _KITTY_SHM_PREVIOUS at the start of the next frame. The old previous generation is unlinked then — giving the terminal a full frame interval to open each segment. Naturally scales with the number of image widgets per frame. Cleanup hooks in draw!() (per-frame), leave_tui!() (TUI exit), prepare_for_exec!() (process replacement), and atexit (process exit). Also adds: - test/test_kitty_shm_stress.jl — multi-widget stress test (pixel/raw modes) - test/cleanup_shm.jl — utility to scan for and unlink leaked segments - Move diagnostic scripts from demos/ to test/ Fixes kahliburke#6
WezTerm supports sixel but not Kitty graphics. It responds to the Kitty graphics protocol query in a way that causes misdetection, which previously caused shm segment leaks. Check TERM_PROGRAM and skip the Kitty query entirely for WezTerm, defaulting to sixel. Fixes kahliburke#7
- Fix "octan_backend"/"octand_backend" typos in load_render_backend! - Fix dots field comment: 8-bit octant masks, not 4-bit quadrant - Fix doc widget tag: canvas_octant instead of canvas_block - Update settings adjust test for 3-element backend cycle
Owner
- create_canvas returns OctantCanvas when octant_backend is active - Settings overlay displays "octant" and cycles through it - Backend demo uses 2x2 grid: braille, block, octant, pixel - Add terminal rendering benchmark script
Author
|
I see. In your setup, octants are clearly unusable. I attach a screen shot from my system:
I am using JuliaMono as font. It has support for the octant characters. In addition, WezTerm special-cases "graphics characters" (line- and block-drawing characters) and renders them not via the font but directly, ensuring they look good (they are supported, there are no gaps, lines match up, etc.). Octants were only added to Unicode 16, which was released in autumn 2024. I guess it has not yet permeated the computing ecosystem yet. |
Owner
|
I will take a look at JuliaMono and see if that changes the rendering. Also, my dark theme bias is showing here, I hadn't noticed that the pixel graphics enforced dark theme ... perhaps something to fix. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #4.