* pdfdocument: rename deleteMarkupAnnotation call to deleteAnnotation
Follows the koreader-base rename of the subtype-agnostic delete helper
(pdf_delete_annot) from deleteMarkupAnnotation to deleteAnnotation.
Companion to koreader/koreader-base#2444.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* bump base
- mupdf: expose ink annotation support in the FFI layer (koreader/koreader-base#2444)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
```
./luajit: frontend/document/document.lua:391: attempt to concatenate field 'background_cleanup' (a nil value)
stack traceback:
frontend/document/document.lua:391: in function 'getFullPageHash'
frontend/document/document.lua:413: in function 'renderPage'
frontend/document/document.lua:534: in function 'drawPage'
frontend/apps/reader/modules/readerview.lua:450: in function 'drawSinglePage'
frontend/apps/reader/modules/readerview.lua:198: in function 'paintTo'
frontend/ui/widget/container/inputcontainer.lua:91: in function 'paintTo'
frontend/ui/uimanager.lua:1262: in function '_repaint'
frontend/ui/uimanager.lua:1485: in function 'handleInput'
frontend/ui/uimanager.lua:1585: in function 'run'
reader.lua:251: in main chunk
[C]: at 0x559b746b885b
```
Cf. #15401.
Includes:
- fix GCC 16 warnings (-Wunused-but-set-variable)
- ldomXRange::getRangeText(): newline on <br/>
- createXPointer(pt)/getRect(): use formatter src->t.text
- getRect(): unify one-char-long word width handling
- CSS ::first-letter: use non-letter char if no letter in first text node
- CSS ::first-line: properly handle inline-block
- createXPointer(pt): return source text node on pseudoElem[FirstLetter]
- getSegmentRects(): compare .bottom additionally to .top
- lvfntman: add getCapHeight()
- CSS initial-letter: add CSS parsing and style slot
- CSS initial-letter: render ::first-letter via inline-box
Also includes:
- MuPDF: check if page has smask before applying it
credocument: fix call cache statistics
Due to changes to renderOptimizedPage(...) made by #15067, which was merged after #14954 was made, a regression was introduced that causes instability and even crashes on mobile devices and e-readers when Invert Document is enabled along with Reflow or Auto Straighten.
This PR fixes the regression and simplifies the drawContextPage(...) method.
Fix annotation import to preserve notes, filter by type, deduplicate,
map drawer, and delete originals from PDF after import.
Closes#15075. Depends on koreader-base#2287.
We may happen to have an empty selection while panning,
no reason to abort the selection yet before release.
Also add get_segments=true to remaining calls to
getScreenBoxesFromPositions() that we forgot to
update to use it.
Reseting the default font each time we refresh metadata
(ie. when refreshing a cover in History) could cause
the rendering hash of the currently opened document
to be messed up, with strange effects.
Hoping setting one in engineInit() is enough to avoid
the crashes the removed comment talks about.
Previously unused by `libk2pdfopt`, the `ocr_type` argument passed to `k2pdfopt_tocr_single_word`
and forwarded to `ocrtess_ocrwords_from_bmp8` now has a big impact for some languages (e.g. Arabic).