Tags: crosspoint-reader/crosspoint-reader
Tags
fix: Roundraff theme home menu offset with no recent books (#1845) ## Summary With the Roundraff theme selected and no recent books, the home screen menu shows a "Continue Reading" option and menu handling is offset by one ("Continue Reading" actually does "Browse Files", "File Transfer" actually does "Settings", etc.) Simple fix here is to omit the "Continue Reading" menu item when there are no recent books. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
chore(release): 1.2.0 Release Candidate (#1483) ## Summary It's been a little while since the last release, but the community has been incredibly busy. With 155 changes from 48 contributors (30 of which were new!), there was a lot to cover. Here are some of the highlights: **🔤 Kerning, Ligatures, and Font Improvements** Text rendering gets a significant upgrade with proper kerning and ligature support, fixed-point fractional x-advance for more accurate character placement, and font compression improvements that reduce flash usage. **📝 Footnotes** Footnote anchor navigation lets you select a footnote reference and jump to the footnote text, then jump back. Slim footnotes support is also available for books that use inline footnotes. **📖 EPUB Optimizer** A new integrated EPUB optimizer can clean up and reprocess books for better compatibility with the reader, directly from the device. **🔋 Battery Charging Indicator** You can now see when your device is actively charging, with a visual indicator on the battery icon. **💾 Crash Diagnostics** When something goes wrong, the firmware now dumps a crash report to the SD card — even without USB plugged in. This makes it much easier to report and diagnose issues. **🌐 New Languages** The community continues to expand language support. New in this release: Turkish, Danish, Finnish, Polish, Dutch, Belarusian, Italian, Ukrainian, Romanian, Catalan, Vietnamese, and Kazakh — along with significant improvements to existing translations. **📂 File Management** Multi-select file deletion, BMP image viewer in the file browser, hidden directory browsing, and long-click file deletion from the file browser. **⚡ Performance** Under the hood, text layout switched from `std::list` to `std::vector`, HTML entity lookups are now O(log(n)), font rendering is faster, image decode is 5-20% faster with per-pixel overhead eliminated, and multiple string allocation hot paths were eliminated. Pre-indexing of the next chapter also reduces page-turn latency at chapter boundaries. --- Along with all of the above, there are many other additions including **WebDAV support**, **auto page turn**, **QR code for current page**, **split status bar settings**, **screenshot capture**, **JSON-based settings migration**, **light/dark theme groundwork**, and a long list of stability fixes and translation improvements. ## What's Changed ### Features * feat: Support for kerning and ligatures by @znelson in #873 * feat: footnote anchor navigation by @Uri-Tauber in #1245 * feat: slim footnotes support by @Uri-Tauber in #1031 * feat: integrated epub optimizer by @zgredex and @pablohc in #1224 * feat: battery charging indicator (mirroring PR #537) by @jpirnay in #1427 * feat: dump crash report to sdcard by @ngxson in #1145 * feat: Implement silent pre-indexing for the next chapter in EpubReaderActivity by @LSTAR1900 in #979 * feat: upgrade platform and support webdav by @dexif in #1047 * feat: Auto Page Turn for Epub Reader by @GenesiaW in #1219 * feat: enhance file deletion functionality with multi-select by @Jessica765 in #682 * feat: Long Click for File Deletion through File Browser by @Levrk in #909 * feat: Take screenshots by @el in #759 * feat: Current page as QR by @el in #1099 * feat: Download links for web server by @el in #1039 * feat: Added BmpViewer activity for viewing .bmp images in file browser by @Levrk in #887 * feat: User setting for image display by @jpirnay in #1291 * feat: Show hidden directories in browser by @jpirnay in #1288 * feat: Prefer ".sleep" over "sleep" for custom image directory by @jpirnay in #948 * feat: Allow a local configuration file for custom compiles by @jpirnay in #879 * feat: Migrate binary settings to json by @jpirnay in #920 * feat: split status bar setting by @whyte-j in #733 * feat: wrapped text in GfxRender, implemented in themes so far by @iandchasse in #1141 * feat: Themed language screen by @CaptainFrito in #1020 * feat: set WiFi hostname to CrossPoint-Reader-XXXXXXXXXXXX by @dexif in #1107 * feat: Add maxAlloc to memory information by @jpirnay in #1152 * feat: replace picojpeg with JPEGDEC for JPEG image decoding by @martinbrook in #1136 * feat: Add git branch to version information on settings screen by @jpirnay in #1225 * feat: sort languages in selection menu by @ariel-lindemann in #1071 * feat: Latin Extended-B European glyphs by @znelson in #1157 * feat: Latin Extended-B European glyphs by @znelson in #1167 * feat: Vietnamese glyphs support by @danoooob in #1147 * feat: add Turkish translation by @barbarhan in #1192 * feat: add full Danish translation by @hajisan in #1146 * feat: Add Finnish translations by @plahteenlahti in #1133 * feat: Add Polish Language by @th0m4sek in #1155 * feat: add Dutch translation by @basvdploeg in #1204 * feat: add Belarusian translation by @dexif in #1120 * feat: Add full Italian translations by @andreaturchet in #1144 * feat: add Ukrainian translation by @mirus-ua in #1065 * feat: Add Kazakh (kk) language support by @fsocietyipa in #1377 * feat: added Romanian strings by @ariel-lindemann in #987 * feat: add Catalan strings by @angeldenom in #1049 * feat: Make directories stand out more in local file browser: "[dir]" instead of "dir" by @jpirnay in #1339 * feat: Add Polish strings for commits #1219,#1169,#1031 +tweaks by @th0m4sek in #1227 * feat: Polish translation tweaks by @th0m4sek in #1193 ### Fixes * fix: Fix img layout issue / support CSS display:none for elements and images by @jpirnay in #1443 * fix: Overlapping battery percentage on image pages with anti-aliasing by @znelson in #1452 * fix: Fix prewarm perf when a page contains many styles by @adriancaruana in #1451 * fix: use sleep routine from the original firmware by @ngxson in #1298 * fix: Prevent line breaks on common English contractions by @znelson in #1405 * fix: Build with -fno-exceptions by @znelson in #1412 * fix: Reduce flash usage by cleaning up I18n translations by @steka in #1401 * fix: jpeg resource cleanup by @jpirnay in #1320 * fix: back button in settings returns to tab bar first by @Cache8063 in #1354 * fix: Init lastSleepImage (edge case) by @jpirnay in #1360 * fix: Add special handling for apostrophe hyphenation by @jpirnay in #1318 * fix: Fix inter-word spacing rounding error in text layout by @znelson in #1311 * fix: load access fault crash by @Uri-Tauber in #1370 * fix: Fix bootloop logging crash by @jpirnay in #1357 * fix: dump crash log without usb plugged, bump release log to INFO by @ngxson in #1332 * fix: avoid zip filename overflow by @jpirnay in #1321 * fix: Hanging indent (negative text-indent) and em-unit sizing by @jpirnay in #1229 * fix: Use fixed-point fractional x-advance and kerning for better text layout by @znelson in #1168 * fix: use HTTPClient::writeToStream for downloading files from OPDS by @osteotek in #1207 * fix: make file system operations thread-safe (HalFile) by @ngxson in #1212 * fix: properly implement requestUpdateAndWait() by @ngxson in #1218 * fix: prevent infinite render loop in Calibre Wireless after file transfer by @pablohc in #1070 * fix: WiFi lifecycle and hyphenation heap defragmentation for KOReader sync by @jpirnay in #1151 * fix: Fix coverRendered flag by @jpirnay in #1154 * fix: Handle non-ASCII characters in sanitizeFilename by @znelson in #1132 * fix: Update activity was missing "Back" button label by @znelson in #1128 * fix: force auto-hinting for Bookerly to fix inconsistent stem widths by @adriancaruana in #1098 * fix: image centering bleed by @martinbrook in #1096 * fix: double free WebDAVHandler by @ngxson in #1093 * fix: Consider extra quotation styles when hyphenating quoted words by @cbix in #1077 * fix: acquire power lock before sleeping by @ngxson in #1125 * fix: Unify inconsistent Wi-Fi/WiFi in Czech translation by @pepastach in #1138 * fix: sdfat warning about redefinition of macro by @ngxson in #1135 * fix: Close leaked file descriptors in SleepActivity and web server by @brbla in #869 * fix: Enable DESTRUCTOR_CLOSES_FILE flag by @daveallie in #1075 * fix: Change "UI Font Size" to "Reader Font Size" by @divinitycove in #1171 * fix: Hide unusable button hints when viewing empty directory by @Levrk in #1253 * fix: broken translations in status bar settings by @ariel-lindemann in #1188 * fix: clarity issue with ambiguous string `SET` by @ariel-lindemann in #1169 * fix: Crash (Load access fault) when indexing chapters containing characters unsupported by bold/italic font variants by @Uri-Tauber in #997 * fix: Increase PNGdec buffer size to support wide images by @osteotek in #995 * fix: Use HalPowerManager for battery percentage by @vjapolitzer in #1005 * fix: Fix dangling pointer by @Uri-Tauber in #1010 * fix: re-implementing Cover Outlines for the new Lyra Themes by @Levrk in #1017 * fix: use double FAST_REFRESH to prevent washout on large grey images by @martinbrook in #957 * fix: Fixed Image Sizing When No Width is Set by @DestinySpeaker in #1002 * fix: Strip unused CSS rules by @daveallie in #1014 * fix: continue reading card classic theme by @pablohc in #990 * fix: Destroy CSS Cache file when invalid by @daveallie in #1018 * fix: Shorten "Forget Wifi" button labels to fit on button by @lukestein in #1045 * fix: improve Spanish translations by @pablohc in #1054 * fix: Fixed book title in home screen by @DestinySpeaker in #1013 * fix: Fix hyphenation and rendering of decomposed characters by @jpirnay in #1037 * fix: Improve and add Spanish translations by @DaniPhii in #1338 * fix: improve and add Spanish translations by @DaniPhii in #1254 * fix: improve and add Swedish translations by @steka in #1317 * fix: Extend missing / amend existing German translations by @jpirnay in #1226 * fix: update french.yaml file to have a better French translation of the CFW by @Spigaw in #1130 * fix: added romanian translation to new strings by @ariel-lindemann in #1105 * fix: add missing romanian strings by @ariel-lindemann in #1187 * fix: add new Ukrainian translation line for STR_SCREENSHOT_BUTTON by @mirus-ua in #1149 * fix: Dutch translation prefix correction by @basvdploeg in #1223 * fix: Small typo in i18n.md regarding C++ identifiers by @victordomingos in #1210 * fix: typo in USER_GUIDE.md by @arnaugamez in #1036 * fix: add missing keyboard metrics to Lyra3CoversTheme by @dexif in #1101 ### Internal * perf: font-compression improvements by @adriancaruana in #1056 * perf: Improve font drawing performance by @jpirnay in #978 * perf: Replace std::list with std::vector in text layout by @znelson in #1038 * perf: Optimize HTML entities lookup to O(log(n)) by @Uri-Tauber in #1194 * perf: UITheme::getMetrics const and const-ref usage by @znelson in #1094 * perf: Avoid creating strings for file extension checks by @znelson in #1303 * perf: Eliminate per-pixel overheads in image rendering by @martinbrook in #1293 * perf: Update github actions for optimal performance with pioarduino by @Jason2866 in #1080 * style: Phase 1 - Simple light dark themes by @cdmoro in #1006 * refactor: implement ActivityManager by @ngxson in #1016 * refactor: Simplify REPLACEMENT_GLYPH fallback by @znelson in #1119 * refactor: Simplify new setting introduction by @jpirnay in #1086 * refactor: Use std binary search algorithms for font lookups by @znelson in #1202 * refactor: rename MyLibrary to FileBrowser by @osteotek in #1260 * refactor: Avoid rebuilding cache path strings by @znelson in #1300 * refactor: reader utils by @Uri-Tauber in #1329 * chore: Remove miniz and modularise inflation logic by @daveallie in #1073 * chore: Resolve several build warnings by @daveallie in #1076 * chore: Removed generated language headers by @znelson in #1156 * chore: Added generated lang headers to .gitignore by @znelson in #1158 * chore: remove redundant xTaskCreate by @ngxson in #1264 * chore: Removed unused PlatformIO include directory placeholder by @znelson in #1417 * chore: micro-optimisation: early exit on fillUncompressedSizes by @jpirnay in #1322 * chore: change label while on settings tab actions by @jpirnay in #1325 * chore: add firmware size history script by @znelson in #1235 * chore: Add powershell script for clang-formatting by @jpirnay in #1472 * chore: Removed unused ConfirmationActivity member by @znelson in #1234 * chore: Update russian.yaml by @madebyKir in #1198 * chore: new Ukrainian translation lines by @mirus-ua in #1199 * chore: new Ukrainian localization strings by @mirus-ua in #1270 * chore: Polish localization for STR_DELETE by @JonaszPotoniec in #1323 * chore: Image settings Polish localization by @znelson in #1299 * chore: add missing Catalan strings by @angeldenom in #1302 * chore: add missing translations for Romanian by @ariel-lindemann in #1265 * chore: Add Portuguese (Portugal) translator to the list by @victordomingos in #1211 * chore: Reduce flash usage by cleaning up I18n translations by @steka in #1401 * docs: Add lightweight contributor onboarding documentation by @bilalix in #894 * docs: ActivityManager migration guide by @znelson in #1222 * docs: USER_GUIDE.md update for 1.1.0 by @divinitycove in #1108 * docs: add quick KOReader sync setup guide by @wjhrdy in #1181 * docs: image support marked as completed by @ariel-lindemann in #1008 * feat: aiagent context definition by @jpirnay in #922 * chore: Update SKILL.md to reflect generated i18n files are gitignored by @znelson in #1423 * fix: ActivityManager tweaks by @znelson in #1220 * fix: Correct relative file paths in SKILL.md documentation by @pablohc in #1304 * fix: add Technically Unsupported section to SCOPE.md by @Uri-Tauber in #1295 ## New Contributors * @DestinySpeaker made their first contribution in #1002 * @arnaugamez made their first contribution in #1036 * @angeldenom made their first contribution in #1049 * @cdmoro made their first contribution in #1006 * @bilalix made their first contribution in #894 * @Jessica765 made their first contribution in #682 * @brbla made their first contribution in #869 * @dexif made their first contribution in #1047 * @mirus-ua made their first contribution in #1065 * @cbix made their first contribution in #1077 * @divinitycove made their first contribution in #1108 * @pepastach made their first contribution in #1138 * @Jason2866 made their first contribution in #1080 * @andreaturchet made their first contribution in #1144 * @Spigaw made their first contribution in #1130 * @iandchasse made their first contribution in #1141 * @th0m4sek made their first contribution in #1155 * @plahteenlahti made their first contribution in #1133 * @hajisan made their first contribution in #1146 * @madebyKir made their first contribution in #1198 * @victordomingos made their first contribution in #1210 * @basvdploeg made their first contribution in #1204 * @wjhrdy made their first contribution in #1181 * @DaniPhii made their first contribution in #1254 * @steka made their first contribution in #1317 * @barbarhan made their first contribution in #1192 * @JonaszPotoniec made their first contribution in #1323 * @Cache8063 made their first contribution in #1354 * @fsocietyipa made their first contribution in #1377 * @LSTAR1900 made their first contribution in #979 * @zgredex made their first contribution in #1224 **Full Changelog**: 1.1.1...release/1.2.0 --------- Co-authored-by: jpirnay <jens@pirnay.com> Co-authored-by: Dani Poveda <daniphii@outlook.com> Co-authored-by: Baris Albayrak <80099286+barbarhan@users.noreply.github.com> Co-authored-by: Barış Albayrak <barisa@pop-os.lan> Co-authored-by: Stefan Blixten Karlsson <sbkarlsson@gmail.com> Co-authored-by: Àngel <153315454+angeldenom@users.noreply.github.com> Co-authored-by: Jonasz Potoniec <jonasz@potoniec.eu> Co-authored-by: Егор Мартынов <martynovegorOF@yandex.ru> Co-authored-by: Mirus <mirusim@gmail.com> Co-authored-by: Spigaw <73850535+Spigaw@users.noreply.github.com> Co-authored-by: ariel-lindemann <41641978+ariel-lindemann@users.noreply.github.com> Co-authored-by: Nima Salami <54304457+hajisan@users.noreply.github.com> Co-authored-by: Arthur Tazhitdinov <lisnake@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Bas van der Ploeg <bas@basvanderploeg.nl> Co-authored-by: martin brook <martin.brook100@googlemail.com>
fix: Fix hyphenation and rendering of decomposed characters (#1037) ## Summary * This PR fixes decomposed diacritic handling end-to-end: - Hyphenation: normalize common Latin base+combining sequences to precomposed codepoints before Liang pattern matching, so decomposed words hyphenate correctly - Rendering: correct combining-mark placement logic so non-spacing marks are attached to the preceding base glyph in normal and rotated text rendering paths, with corresponding text-bounds consistency updates. - Hyphenation around non breaking space variants have been fixed (and extended) - Hyphenation of terms that already included of hyphens were fixed to include Liang pattern application (eg "US-Satellitensystem" was *exclusively* broken at the existing hyphen) ## Additional Context * Before <img width="800" height="480" alt="2" src="/deoxy?target=https%3A%2F%2Fgithub.com%2Fcrosspoint-reader%2Fcrosspoint-reader%2F%253Ca%2520href%3D"https://github.com/user-attachments/assets/b9c515c4-ab75-45cc-8b52-f4d86bce519d">https://github.com/user-attachments/assets/b9c515c4-ab75-45cc-8b52-f4d86bce519d" /> * After <img width="480" height="800" alt="fix1" src="/deoxy?target=https%3A%2F%2Fgithub.com%2Fcrosspoint-reader%2Fcrosspoint-reader%2F%253Ca%2520href%3D"https://github.com/user-attachments/assets/4999f6a8-f51c-4c0a-b144-f153f77ddb57">https://github.com/user-attachments/assets/4999f6a8-f51c-4c0a-b144-f153f77ddb57" /> <img width="800" height="480" alt="fix2" src="/deoxy?target=https%3A%2F%2Fgithub.com%2Fcrosspoint-reader%2Fcrosspoint-reader%2F%253Ca%2520href%3D"https://github.com/user-attachments/assets/7355126b-80c7-441f-b390-4e0897ee3fb6">https://github.com/user-attachments/assets/7355126b-80c7-441f-b390-4e0897ee3fb6" /> * Note 1: the hyphenation fix is not a 100% bullet proof implementation. It adds composition of *common* base+combining sequences (e.g. O + U+0308 -> Ö) during codepoint collection. A complete solution would require implementing proper Unicode normalization (at least NFC, possibly NFKC in specific cases) before hyphenation and rendering, instead of hand-mapping a few combining marks. That was beyond the scope of this fix. * Note 2: the render fix should be universal and not limited to the constraints outlined above: it properly x-centers the compund glyph over the previous one, and it uses at least 1pt of visual distance in y. Before: <img width="478" height="167" alt="Image" src="/deoxy?target=https%3A%2F%2Fgithub.com%2Fcrosspoint-reader%2Fcrosspoint-reader%2F%253Ca%2520href%3D"https://github.com/user-attachments/assets/f8db60d5-35b1-4477-96d0-5003b4e4a2a1">https://github.com/user-attachments/assets/f8db60d5-35b1-4477-96d0-5003b4e4a2a1" /> After: <img width="479" height="180" alt="Image" src="/deoxy?target=https%3A%2F%2Fgithub.com%2Fcrosspoint-reader%2Fcrosspoint-reader%2F%253Ca%2520href%3D"https://github.com/user-attachments/assets/1b48ef97-3a77-475a-8522-23f4aca8e904">https://github.com/user-attachments/assets/1b48ef97-3a77-475a-8522-23f4aca8e904" /> * This should resolve the issues described in #998 --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**PARTIALLY**_
feat: Add percentage support to CSS properties (#738) ## Summary - Closes #730 **What is the goal of this PR?** - Adds percentage-based value support to CSS properties that accept percentages (padding, margin, text-indent) **What changes are included?** - Adds `Percent` as another CSS unit - Passes the viewport width to `fromCssStyle` so that we can resolve percentage-based values - Adds a fallback of using an emspace for text-indent if we have an unresolvable value for whatever reason ## Additional Context - This was missed in my CSS support feature, and the fallback when we encounter a percentage value is to use px instead. This means 5% (which would be ~30px on the screen) turns into 5px. When percentages are used in `text-indent`, this fallback behavior makes the indent look like a single space character. Whoops! 😬 My test EPUB has been updated [here](https://github.com/jdk2pq/css-test-epub) with percentage based CSS values at the end of the book. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**YES**_, Claude Code
PreviousNext