Skip to content

Remove gaps between text glyph bounding box click targets so selection is more reliable#4098

Merged
Keavon merged 2 commits intomasterfrom
text-glued-click-targets
May 3, 2026
Merged

Remove gaps between text glyph bounding box click targets so selection is more reliable#4098
Keavon merged 2 commits intomasterfrom
text-glued-click-targets

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented May 3, 2026

An improvement to #4095.

Each glyph's box is widened to touch the adjacent glyph, instead of just tightly bounding its own geometry:

image

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a mechanism to widen glyph bounding boxes horizontally, filling gaps between adjacent characters to improve click-targeting for text. This is achieved by deferring click target creation to the finalize stage and introducing a widen_horizontal_gaps helper function. Review feedback suggests optimizing memory usage by storing bounding boxes directly instead of full subpaths and increasing the floating-point tolerance when comparing baselines to ensure more robust layout calculations.

Comment thread node-graph/nodes/text/src/path_builder.rs Outdated
Comment thread node-graph/nodes/text/src/path_builder.rs
Comment thread node-graph/nodes/text/src/path_builder.rs Outdated
Comment thread node-graph/nodes/text/src/path_builder.rs Outdated
Comment thread node-graph/nodes/text/src/path_builder.rs Outdated
@Keavon Keavon merged commit b27b4c6 into master May 3, 2026
11 checks passed
@Keavon Keavon deleted the text-glued-click-targets branch May 3, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant