Part of #394: Type Object Selection by Path Only

Preferences › Type › Type Object Selection by Path Only was stored and never read.
On, the Selection tools pick type on its type path only — point type's baseline
(the line the selection marks under it, across its layout's width), area type's
frame, type on a path's path — within the selection tolerance; a click among the
glyphs or inside the frame selects nothing. Off (the default), anywhere in the
type's bounds selects it, as before.

`HitOptions` gains `type_path_only`, set by the tools' context (`hit_options()`)
and the canvas's `hit_at` from the preference, so the Selection tools, Cmd-click
behind, object highlighting and the context menu agree. Tests at the hit-test
level (point, area and on-path type) and through the Selection tool with
`prefs.set`.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
wstockandClaude Fable 5.1 authored and bflatastic committed 2026-10-08 18:59:47 +07:00
1 parent 40d6975b02
commit beea693ee1
9 files changed
+122 -9

No files matched your search

+4
View File
@@ -1211,6 +1211,10 @@ Not read yet: Construction Guides and their Angles, and Spacing Guides (the tool
selection (←/→), leading (↑/↓) and baseline shift (Shift+↑/↓), five steps with Cmd/Ctrl too.
- `missingGlyphProtection` (on by default): `text.setStyle` and `text.setRangeStyle` changing the font leave the
characters the new font has no glyph for in the font that had one.
- `typeSelectionByPathOnly` (off by default): on, the Selection tools (`pointer_gesture` with `selection`, and the
mouse) pick type on its type path only — point type's baseline, area type's frame, type on a path's path — within
`selectionTolerance`; a click among the glyphs or inside the frame selects nothing. Off, anywhere in the type's
bounds selects it.
```json
{"name":"run_command","arguments":{"command":"prefs.set","params":{"values":{"typeSizeIncrement":4,"trackingIncrement":50}}}}