image_viewer: Select PDF text by character

- Selections are character ranges backed by pdfium character boxes,
  fetched per page on demand and cached, so a drag stops mid-word and
  copy yields the exact substring.
- Double clicks select the word under the pointer and right clicks
  outside the selection select the word before opening the context menu.
- Highlight runs merge neighbouring characters on a line, keeping the
  painted quad count low, and margins clicks resolve to the nearest glyph.
- Saving a copy of the document is available from the toolbar, the
  context menu, and ctrl-s; picking the opened file itself is a no-op.
This commit is contained in:
yenru0 committed 2026-09-24 04:09:43 +09:00
1 parent ebf342c60b
commit 46d628e9c7
6 files changed
+742 -427

No files matched your search

+1
View File
@@ -1629,6 +1629,7 @@
"ctrl-f": "image_viewer::FindInDocument",
"ctrl-g": "image_viewer::FindNext",
"ctrl-shift-g": "image_viewer::FindPrevious",
"ctrl-s": "image_viewer::SaveCopyAs",
"ctrl-shift-t": "image_viewer::ToggleTextPanel"
},
},
+1
View File
@@ -1681,6 +1681,7 @@
"cmd-f": "image_viewer::FindInDocument",
"cmd-g": "image_viewer::FindNext",
"cmd-shift-g": "image_viewer::FindPrevious",
"cmd-s": "image_viewer::SaveCopyAs",
"cmd-shift-t": "image_viewer::ToggleTextPanel"
},
},
+1
View File
@@ -1604,6 +1604,7 @@
"ctrl-f": "image_viewer::FindInDocument",
"ctrl-g": "image_viewer::FindNext",
"ctrl-shift-g": "image_viewer::FindPrevious",
"ctrl-s": "image_viewer::SaveCopyAs",
"ctrl-shift-t": "image_viewer::ToggleTextPanel"
},
},