FA-80688 / Bidirectional text layout / Member archive
Bidi hit testing: left clamp · case 03
Clicks left of the line hit characters at the far end.
Case contract
Input [levels, x in half-character units]. Clamp to a visual slot (each character 2 units). The right half of an LTR character or the left half of an RTL character is its trailing side. Points before the line use the left half of slot 0, beyond it the right half of the last slot. Return [logical index, trailing, caret offset].
Why this case matters
Mixed right-to-left and left-to-right text must resolve levels and visual order exactly, or words, numbers and carets land in the wrong place.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: left clamp | [0, true, 1] | [6, true, 7] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗