Commit Graph
988 Commits
Author SHA1 Message Date
Arthur TazhitdinovandCopilot 952652aa9b TOC location fix (#25)
## Summary

* Rely on media-type="application/x-dtbncx+xml" to find TOC instead of
hardcoded values

## Additional Context

* Most of my epubs don't have id==ncx for toc file location. I think
this media-type is EPUB standard

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-17 18:49:45 +11:00
Dave Allie 6879efac82 Use 6x8kB chunks instead of 1x48kB chunk for secondary display buffer (#36)
## Summary

- When allocating the `bwBuffer` required to restore the RED RAM in the
EPD, we were previously allocating the whole frame buffer in one
contiguous memory chunk (48kB)
- Depending on the state of memory fragmentation at the time of this
call, it may not be possible to allocate all that memory
- Instead, we now allocate 6 blocks of 8kB instead of the full 48kB,
this should mean the display updates are more resilient to different
memory conditions

## Additional Context
2025-12-17 01:39:22 +11:00
Dave Allie eec3766bcf Use single buffer mode for EInkDisplay (#34)
## Summary

* Frees up 48kB of statically allocated RAM in exchange for 48kB just
when grayscale rendering is needed

## Additional Context

* Upstream changes:
https://github.com/open-x4-epaper/community-sdk/pull/7
2025-12-17 00:17:49 +11:00
Jonas Diemer 78269d67e6 Improve indent (#28)
* add horizontal indent in first line of paragraph in case Extra Paragraph Spacing is OFF

* Treat tabs as whitespace (so they are properly stripped)

* Changed size of indent to 1 em.

* Fixed calculation of space when indenting (avoiding squeezed text).

* Source code formatting
2025-12-16 23:02:32 +11:00
Arthur Tazhitdinov fabea7ad41 Add Cyrillic range to fonts (#27)
* Enhance TOC parsing and chapter selection logic

- Update .gitignore to include additional paths
- Refactor Epub::parseContentOpf to improve NCX item retrieval
- Modify ContentOpfParser to store media type in ManifestItem
- Implement rebuildVisibleSpineIndices in EpubReaderChapterSelectionScreen for better chapter navigation
- Adjust rendering logic to handle empty chapter lists gracefully

* Refactor TOC parsing logic to streamline cover image and NCX item retrieval

* add cyrillic ranges

* revert

* clang format fix
2025-12-16 22:52:49 +11:00
Dave Allie 9f7b00c2a5 Parse cover image path from content.opf file (#24) 2025-12-16 03:15:54 +11:00
Dave Allie 5f150d3024 Fixed light gray text rendering 2025-12-16 02:16:38 +11:00
Dave Allie 3303541e15 Fix formatting 2025-12-15 23:17:23 +11:00
Jonas Diemer a10d903a9f Settings Screen and first 2 settings (#18)
* white sleep screen

* quicker pwr button

* no extra spacing between paragraphs

* Added settings class with de/serialization and whiteSleepScreen setting to control inverting the sleep screen

* Added Settings screen for real, made settings a global singleton

* Added setting for extra paragraph spacing.

* fixed typo

* Rework after feedback

* Fixed type from bool to uint8
2025-12-15 23:16:46 +11:00
Dave Allie 8175069ea7 Return -1 from getTocIndexForSpineIndex if TOC item does not exist 2025-12-13 21:17:22 +11:00
Dave Allie 114c8b3a43 Process lines into pages as they are built 2025-12-13 20:10:16 +11:00
Dave Allie fe831c615c Remove tinyxml2 dependency replace with expat parsers (#9) 2025-12-13 19:36:01 +11:00
Dave Allie 33e1499175 Show clearer indexing string 2025-12-13 16:02:27 +11:00
Dave Allie 11857183cc Bump page file version 2025-12-13 00:42:17 +11:00
Dave Allie 779f3b07e2 Swap out babyblue font for pixelarial14 2025-12-13 00:16:10 +11:00
Dave Allie f74c0d23a9 Move to smart pointers and split out ParsedText class (#6)
* Move to smart pointers and split out ParsedText class

* Cleanup ParsedText

* Fix clearCache functions and clear section cache if page load fails

* Bump Page and Section file versions

* Combine removeDir implementations in Epub

* Adjust screen margins
2025-12-12 22:13:34 +11:00
Dave Allie a98a2808b8 Add drawCenteredText to GfxRenderer 2025-12-08 22:52:19 +11:00
Dave Allie 797ddaab86 Cleanup serial output 2025-12-08 22:39:23 +11:00
Dave Allie 0800e8a845 Remove EpdRenderer and create new GfxRenderer 2025-12-08 22:06:09 +11:00
Dave Allie c239cbbd89 Move to SDK EInkDisplay and enable anti-aliased 2-bit text (#5)
* First pass at moving to SDK EInkDisplay library

* Add 2-bit grayscale text and anti-aliased rendering of text

* Render status bar for empty chapters

* Refresh screen every 15 pages to avoid ghosting

* Simplify boot and sleep screens

* Give FileSelectionScreen task more stack memory

* Move text around slightly on Boot and Sleep screens

* Re-use existing buffer and write to whole screen for 'partial update'
2025-12-08 19:48:49 +11:00
Dave Allie d2d39427af Stream inflated EPUB HTMLs down to disk instead of inflating in memory (#4)
* Downgrade miniz for stability

* Stream HTML from ZIP down to disk instead of loading all in mem
2025-12-08 00:39:17 +11:00
Dave Allie 1477520db8 Fix 1-bit font pixel alignment of last byte 2025-12-07 12:25:10 +11:00
Dave Allie f6a7f8fe18 Build and use 1-bit font, saves a good amount of space 2025-12-07 01:26:49 +11:00
Dave Allie 6b3fbed01b Reduce number of full screen refreshes to once every 20 pages 2025-12-06 22:12:01 +11:00
Dave Allie 5a23d72724 Version section bin files 2025-12-06 22:09:25 +11:00
Dave Allie 6da028c703 Add expat and swap out EPUB HTML parser (#2)
* Add expat and swap out ERB HTML parser

* Increase EpubHtmlParserSlim file buffer to 1024 bytes

* Cleanup TextBlock functions

* Do not break words when leaving spans
2025-12-06 20:57:24 +11:00
Dave Allie 6fe291f96c Small cleanup 2025-12-06 20:24:24 +11:00
Dave Allie 1cbee2cb92 More pass by reference changes 2025-12-06 15:56:00 +11:00
Dave Allie 00fd1a033a Use reference passing for EpdRenderer 2025-12-06 12:56:39 +11:00
Dave Allie 9d3eaf4388 Update sleep screen 2025-12-06 04:20:41 +11:00
Dave Allie 58cd36d51e Add UI font 2025-12-06 01:44:14 +11:00
Dave Allie d2bba3bac7 Wrap up multiple font styles into EpdFontFamily 2025-12-06 01:44:14 +11:00
Dave Allie b5970a27e3 Show indexing text when indexing 2025-12-05 21:12:15 +11:00
Dave Allie bae4fc6a04 Avoid ghosting on sleep screen by doing a full screen update 2025-12-05 17:55:17 +11:00
Dave Allie 35284ac4b6 Add file selection screen 2025-12-04 00:11:51 +11:00
Dave Allie 91357548eb Handle nested navpoint elements in nxc TOC 2025-12-03 22:30:50 +11:00
Dave Allie 980a06fa62 Remove debug lines 2025-12-03 22:30:13 +11:00
Dave Allie 9f5253313f Public release 2025-12-03 22:06:45 +11:00