foobnix / LibreraReader

Book Reader for Android
http://librera.mobi
Other
2.87k stars 305 forks source link

Anchor bookmarks to paragraph rather than page #1144

Open chemicalcain opened 1 year ago

chemicalcain commented 1 year ago

I recently changed fonts and it reflowed all my epubs because the font's kerning and line spacing are different from previous. This means the text I saved in Bookmarks now links to the wrong page. If bookmarks were links to a specific paragraph (like the numbers in Calibre-style "Reference Mode") this would solve my problem.

chemicalcain commented 1 year ago

(Unrelated but I am pleased to note that my chosen font works in all my epubs in the latest F-droid version! Previously I had a few epubs which overrode my chosen font, but that seems to be solved now.)

chemicalcain commented 1 year ago

Investigating how Librera handles bookmarks to give myself some further insight. Here's a line of my app-Bookmarks.json: "1694142910667":{"isF":false,"p":0.36120403,"path":"/storage/3132-3733/Books/Fiction/Crooked_House.epub","t":1694142910667,"text":"Quick Bookmark"} Not sure which of these numbers refers to position or how we could change them to Calibre-style paragraph anchors. If this is changed, there should be a warning on the settings toggle that changing from page-style bookmarks to Calibre-style bookmarks will break old bookmarks.