Skip to content

Feature: go to text/start reference in epub guide section at first start#156

Merged
daveallie merged 16 commits intocrosspoint-reader:masterfrom
jonasdiemer:feature/epub-guide-to-start
Dec 30, 2025
Merged

Feature: go to text/start reference in epub guide section at first start#156
daveallie merged 16 commits intocrosspoint-reader:masterfrom
jonasdiemer:feature/epub-guide-to-start

Conversation

@jonasdiemer
Copy link
Copy Markdown
Contributor

This parses the guide section in the content.opf for text/start references and jumps to this on first open of the book.

Currently, this behavior will be repeated in case the reader manually jumps to Chapter 0 and then re-opens the book. IMO, this is an acceptable edge case (for which I couldn't see a good fix other than to drag a "first open" boolean around).

@daveallie
Copy link
Copy Markdown
Member

This has the potential to skip things like forewards and dedications / other preamble. If people want to skip over it, I think the chapter select screen should be sufficient. I'm not really keen to just auto-skip to chapter 1.

Spec: https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.6

@jonasdiemer
Copy link
Copy Markdown
Contributor Author

jonasdiemer commented Dec 30, 2025

Correct, it would skip the "front matter", including the cover and publisher images (which we don't render anyways).

I am used to this behavior from kindle (maybe other readers) and thought it a good solution to skip over those "unnamed" and garbage chapters.

I agree it could be confusing and/or not what ppl want.

How about a popup with a question, incl a list of chapters that would be skipped?

or we could breselect the text chapter in the chapter select screen on first open?

@pablohc
Copy link
Copy Markdown
Contributor

pablohc commented Dec 30, 2025

@jonasdiemer @daveallie When loading the book for the first time, it could be implemented so that holding down the “Right” button takes you directly to Chapter 1. Those who do not want to skip it will be able to move forward page by page.

@daveallie
Copy link
Copy Markdown
Member

After a bit more digging, it looks like the field of ereaders out there generally honor the guide and jump to the start.

Given that's where the crowd is, happy to merge this one, will just need a small conflict resolution.

treetrum and others added 12 commits December 30, 2025 12:23
## Summary

- **What is the goal of this PR?** Add chapter selection support to the
XTC reader activity, including parsing chapter metadata from XTC files.
- **What changes are included?** Implemented XTC chapter parsing and
exposure in the XTC library, added a chapter selection activity for XTC,
integrated it into XtcReaderActivity, and normalized chapter page
indices by shifting them to 0-based.

  ## Additional Context

- The reader uses 0-based page indexing (first page = 0), but the XTC
chapter table appears to be 1-based (first page = 1), so chapter
start/end pages are shifted down by 1 during parsing.
## Summary

* Accept big endian version in XTC files
* Recently, two issues
(crosspoint-reader#157 and
crosspoint-reader#146) have popped
up with XTC files with a big endian encoded version. This is read out as
256.
  * We should be more lax and accept these values.
## Summary

* Split XTC file version into major minor bytes
  * Continue to support both 1.0 and 0.1

## Additional Context

* See
crosspoint-reader#146 (comment)
for more detail

FYI @treetrum @eunchurn
…rosspoint-reader#153)

The default version parses a lot of files and takes ~5s on my machine.
This adds an option `-g` to run only on files modified/staged in git.
* Swap to updated SDCardManager which uses SdFat
* Add exFAT support
  * Swap to using FsFile everywhere
* Use newly exposed `SdMan` macro to get to static instance of
SDCardManager
* Move a bunch of FsHelpers up to SDCardManager
## Summary

* Show previous title for unnamed spines
* The spec is a little unclear, but there are plenty of cases where
chapters are split up in parts and should show the previous chapter's
title
* List TOC items instead of spine items in chapter select
* Bump `BOOK_CACHE_VERSION` to `2` to force regeneration of spine item's
TOC indexes
## Summary

* Swap out Bookerly font due to licensing issues, replace default font
with Aleo
* I did a bunch of searching around for a nice replacement font, and
this trumped several other like Literata, Merriwether, Vollkorn, etc
* Add Noto Sans, and Open Dyslexic as font options
  * They can be selected in the settings screen
* Add font size options (Small, Medium, Large, Extra Large)
  * Adjustable in settings
* Swap out uses of reader font in headings and replaced with slightly
larger Ubuntu font
* Replaced PixelArial14 font as it was difficult to track down, replace
with Space Grotesk
* Remove auto formatting on generated font files
* Massively speeds up formatting step now that there is a lot more CPP
font source
* Include fonts with their licenses in the repo

## Additional Context

Line compression setting will follow

| Font | Small | Medium | Large | X Large |
| --- | --- | --- | --- | --- |
| Aleo |
![IMG_5704](https://github.com/user-attachments/assets/7acb054f-ddef-4080-b3c8-590cfaf13115)
|
![IMG_5705](https://github.com/user-attachments/assets/d4819036-5c89-486e-92c3-86094fa4d89a)
|
![IMG_5706](https://github.com/user-attachments/assets/35caf622-d126-4396-9c3e-f927eba1e1f4)
|
![IMG_5707](https://github.com/user-attachments/assets/af32370a-6244-400f-bea9-5c27db040b5b)
|
| Noto Sans |
![IMG_5708](https://github.com/user-attachments/assets/1f9264a5-c069-4e22-9099-a082bfcaabc5)
|
![IMG_5709](https://github.com/user-attachments/assets/ef6b07fe-8d87-403a-b152-05f50b69b78e)
|
![IMG_5710](https://github.com/user-attachments/assets/112a5d20-262c-4dc0-b67d-980b237e4607)
|
![IMG_5711](https://github.com/user-attachments/assets/d25e0e1d-2ace-450d-96dd-618e4efd4805)
|
| Open Dyslexic |
![IMG_5712](https://github.com/user-attachments/assets/ead64690-f261-4fae-a4a2-0becd1162e2d)
|
![IMG_5713](https://github.com/user-attachments/assets/59d60f7d-5142-4591-96b0-c04e0a4c6436)
|
![IMG_5714](https://github.com/user-attachments/assets/bb6652cd-1790-46a3-93ea-2b8f70d0d36d)
|
![IMG_5715](https://github.com/user-attachments/assets/496e7eb4-c81a-4232-83e9-9ba9148fdea4)
|
…t-reader#164)

## Summary

* Add setting for line spacing to adjust space between lines
* Aleo is already a bit tighter than Noto Sans and Open Dyslexic, so
have adjusted the values to match, this can be tweaked in the future
## Summary

* Parse the author name from content.opf file
  * Listed in the dc:creator tag within the metadata section
@jonasdiemer
Copy link
Copy Markdown
Contributor Author

OK, I (hopefully) resolved the conflicts.

Anyhow, I think it might even be a good default behavior to show the Chapter selection activity on first open (with the text chapter pre-selected if it exists in the guide)... @daveallie, what do you think?

@daveallie
Copy link
Copy Markdown
Member

oops, sorry I think I made some more conflicts 😬 as you were resolving those ones (looks like you sorted it)

I think we should just throw them into the content, even just testing with apple books, it drops you right into the prelude from the book I was testing with.

@daveallie daveallie merged commit 03f0ce0 into crosspoint-reader:master Dec 30, 2025
1 check passed
Unintendedsideeffects pushed a commit to Unintendedsideeffects/crosspoint-reader that referenced this pull request Feb 17, 2026
…art (crosspoint-reader#156)

This parses the guide section in the content.opf for text/start
references and jumps to this on first open of the book.

Currently, this behavior will be repeated in case the reader manually
jumps to Chapter 0 and then re-opens the book. IMO, this is an
acceptable edge case (for which I couldn't see a good fix other than to
drag a "first open" boolean around).

---------

Co-authored-by: Sam Davis <sam@sjd.co>
Co-authored-by: Dave Allie <dave@daveallie.com>
whale-n pushed a commit to whale-n/njwiv-xt that referenced this pull request Mar 17, 2026
…art (crosspoint-reader#156)

This parses the guide section in the content.opf for text/start
references and jumps to this on first open of the book.

Currently, this behavior will be repeated in case the reader manually
jumps to Chapter 0 and then re-opens the book. IMO, this is an
acceptable edge case (for which I couldn't see a good fix other than to
drag a "first open" boolean around).

---------

Co-authored-by: Sam Davis <sam@sjd.co>
Co-authored-by: Dave Allie <dave@daveallie.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants