-
Notifications
You must be signed in to change notification settings - Fork 0
feat(compositor): text color, font selection, draggable layers, clipping fix #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
streamer45
merged 10 commits into
video
from
devin/1772554047-compositor-text-improvements
Mar 3, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e6adcd9
feat(compositor): text color, font selection, draggable layers, clipp…
streamkit-devin 90bcb03
style: apply rustfmt to overlay.rs
streamkit-devin e622da9
fix: batch reorder z-index updates and add color comparison
streamkit-devin b14f6d3
fix: use dynamic max z-index for new overlays instead of fixed bands
streamkit-devin bb608d1
fix: expand text overlay bitmap to measured text dimensions
streamkit-devin a878d66
style: cargo fmt
streamkit-devin 35cd503
fix: address review — atomic reorder commit and complete font list
streamkit-devin e386955
feat: render font selection in canvas preview and fix dropdown contrast
streamkit-devin 33f06f8
fix: improve font preview fallbacks and remove alpha slider
streamkit-devin 76ea25a
fix: preserve existing alpha when changing text color
streamkit-devin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡
measure_textheight includes above-origin pixels thatblit_text_rgbaclips, causing top-of-glyph clipping for tall ascendersThe new
measure_textfunction (crates/nodes/src/video/mod.rs:56-89) computes height asmax_bottom - max_top, wheremax_topcan be negative for glyphs taller than 'A' (e.g. accented capitals like Á, É). However,rasterize_text_overlay(crates/nodes/src/video/compositor/overlay.rs:231-236) callsblit_text_rgbawithorigin_y: 0. Inblit_text_rgba, any pixel atdst_y < 0is clipped (crates/nodes/src/video/mod.rs:134). This means: for 'Á' withgy = -3, the top 3 pixel rows (containing the accent mark) are lost, while 3 unused rows are allocated at the bottom of the bitmap. The fix is to passorigin_y = -max_top(i.e., the absolute value of the most-negative gy) to shift rendering down so all glyphs fit. Sincemeasure_textonly returns(width, height), it would need to also return the y-offset.(Refers to lines 231-236)
Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
Playground
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on the ascender clipping for accented characters. This is a pre-existing limitation (
blit_text_rgbaalways usedorigin_y: 0), but now that we havemeasure_textit would be straightforward to return the y-offset and pass it through. Will address if requested.