Add text_ui example and update changelog - #211
Open
tobert wants to merge 7 commits into
Open
Conversation
Member
|
Adding |
tobert
force-pushed
the
docs/text-ui-example
branch
3 times, most recently
from
March 8, 2026 23:01
dbdf4af to
9f13caf
Compare
…fines - Extract CalculatedClip during ECS extraction for all 4 UI types - Convert to kurbo::Rect via to_kurbo_clip() with NaN/infinity sanitization - Push/pop clip layers in render_frame around each UI item - Skip glyph runs outside clip rect with early exit - Floor UI affine translations to align with integer-snapped clip rects - sort_unstable_by → sort_by for UI queue to prevent order flipping - Skip fully transparent items before pushing clip layers Partially addresses linebender#204. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tobert
force-pushed
the
docs/text-ui-example
branch
2 times, most recently
from
March 10, 2026 00:07
699fde3 to
6514b68
Compare
Replace the 2× font_size margin hack with LineMetrics::min_coord / max_coord from Parley, which give the exact vertical extent of each line including ascenders and descenders. Culling is also lifted from per-glyph-run to per-line, which is both more accurate and slightly more efficient. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tobert
force-pushed
the
docs/text-ui-example
branch
from
March 10, 2026 11:14
6514b68 to
682ab47
Compare
Replace the axis-aligned-only culling path (which disabled culling entirely under rotation) with inverse-transforming the clip rect corners into layout space and taking the vertical AABB. This works for any invertible affine including rotation and non-uniform scale. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VelloSceneDirty(bool) resource gates sort_render_items + render_frame via run_if. detect_vello_scene_changes checks Changed<> on all Vello component types, camera, window, render settings, and asset events. TextLayoutCache — content-addressed double-buffer cache in the render world. Layouts keyed by SipHash of (font ID, text, style, alignment, max_advance). Untouched entries naturally drop after one idle frame. Also includes: - FRAMES_SKIPPED diagnostic (1.0 skipped, 0.0 rendered) - VelloRenderSettings crash fix (now inserted into both worlds) - 9 unit tests for TextLayoutCache including brush-invariance - Anchor helper functions moved before impl block Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tobert
force-pushed
the
docs/text-ui-example
branch
from
March 10, 2026 11:44
682ab47 to
f24abdc
Compare
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.
Summary
Adds a
text_uiexample demonstrating all 9VelloTextAnchorvariants in a 3x3 grid with debug outlines enabled.Originally added to #206 by @nuzzles. Depends on #208 #209 #210.
Test plan
cargo check -p text_uicargo run -p text_ui— verify 3x3 grid with correct anchor positionsSeries
This is PR 4 of 5:
fix/ui-text-anchor— fix UI text anchor positioningfix/ui-clip-rects— CalculatedClip support, glyph culling, pixel-snap affinesperf/dirty-tracking— skip unchanged frames, text layout cachefix/linux-windowing— add x11/wayland features for Linux compilation