Compare commits
53
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e12083566 | ||
|
|
cf4f7be8af | ||
|
|
e69241ef54 | ||
|
|
72b99a2a9c | ||
|
|
62448b3c08 | ||
|
|
3e1dd31e53 | ||
|
|
685d4e88f9 | ||
|
|
79b4d63ee2 | ||
|
|
57447a56a6 | ||
|
|
5c86bfe1fd | ||
|
|
4cdefb137c | ||
|
|
e7f3406704 | ||
|
|
6f08a88b12 | ||
|
|
e4d3981469 | ||
|
|
c9d27826f9 | ||
|
|
13bd00bf9d | ||
|
|
fef39da23c | ||
|
|
fd43ca2fe1 | ||
|
|
28255061fb | ||
|
|
43ff1b6644 | ||
|
|
2754a5ff01 | ||
|
|
6edeed73c5 | ||
|
|
8ac302018c | ||
|
|
a11517a62d | ||
|
|
cbaa498ccc | ||
|
|
ebebc6f202 | ||
|
|
970b2c6ca1 | ||
|
|
b6ce599b20 | ||
|
|
f54eab2725 | ||
|
|
0d4c9ab91b | ||
|
|
0daa9db243 | ||
|
|
a2f2eea79e | ||
|
|
86a9b9c4a2 | ||
|
|
ba44978ac4 | ||
|
|
555f76da88 | ||
|
|
0a57c0a5a7 | ||
|
|
a09aef0889 | ||
|
|
8626d69f46 | ||
|
|
fc89e57e69 | ||
|
|
487613b082 | ||
|
|
8d5b119644 | ||
|
|
7271c00d35 | ||
|
|
6e8dbd7f23 | ||
|
|
c4b1d9644a | ||
|
|
f6e59aab72 | ||
|
|
9ad2da0950 | ||
|
|
1db1442319 | ||
|
|
362dcb2a65 | ||
|
|
d1abcc00a2 | ||
|
|
0ce874f8d4 | ||
|
|
282514f755 | ||
|
|
d1e4650e19 | ||
|
|
370f87ea01 |
No files matched your search
+2
-2
@@ -7,7 +7,7 @@ Mission: Provide a lightweight, high-performance reading experience focused on E
|
|||||||
* Role: Senior Embedded Systems Engineer (ESP-IDF/Arduino-ESP32 specialized).
|
* Role: Senior Embedded Systems Engineer (ESP-IDF/Arduino-ESP32 specialized).
|
||||||
* Primary Constraint: 380KB RAM is the hard ceiling. Stability is non-negotiable.
|
* Primary Constraint: 380KB RAM is the hard ceiling. Stability is non-negotiable.
|
||||||
* Evidence-Based Reasoning: Before proposing a change, you MUST cite the specific file path and line numbers that justify the modification.
|
* Evidence-Based Reasoning: Before proposing a change, you MUST cite the specific file path and line numbers that justify the modification.
|
||||||
* Anti-Hallucination: Do not assume the existence of libraries or ESP-IDF functions. If you are unsure of an API's availability for the ESP32-C3 RISC-V target, check the open-x4-sdk or official docs first.
|
* Anti-Hallucination: Do not assume the existence of libraries or ESP-IDF functions. If you are unsure of an API's availability for the ESP32-C3 RISC-V target, check the freeink-sdk source or the FreeInk SDK docs (https://freeink.org/llms.txt for an LLM-readable index) first.
|
||||||
* No Unfounded Claims: Do not claim performance gains or memory savings without explaining the technical mechanism (e.g., DRAM vs IRAM usage).
|
* No Unfounded Claims: Do not claim performance gains or memory savings without explaining the technical mechanism (e.g., DRAM vs IRAM usage).
|
||||||
* Resource Justification: You must justify any new heap allocation (new, malloc, std::vector) or explain why a stack/static alternative was rejected.
|
* Resource Justification: You must justify any new heap allocation (new, malloc, std::vector) or explain why a stack/static alternative was rejected.
|
||||||
* Verification: After suggesting a fix, instruct the user on how to verify it (e.g., monitoring heap via Serial or checking a specific cache file).
|
* Verification: After suggesting a fix, instruct the user on how to verify it (e.g., monitoring heap via Serial or checking a specific cache file).
|
||||||
@@ -127,7 +127,7 @@ These flags in `platformio.ini` fundamentally affect firmware behavior:
|
|||||||
* lib/hal/: Hardware Abstraction Layer (HalDisplay, HalGPIO, HalStorage)
|
* lib/hal/: Hardware Abstraction Layer (HalDisplay, HalGPIO, HalStorage)
|
||||||
* lib/I18n/: Internationalization (translations in `translations/*.yaml`, generated string tables)
|
* lib/I18n/: Internationalization (translations in `translations/*.yaml`, generated string tables)
|
||||||
* src/activities/: UI logic using the Activity Lifecycle (onEnter, loop, onExit)
|
* src/activities/: UI logic using the Activity Lifecycle (onEnter, loop, onExit)
|
||||||
* open-x4-sdk/: Low-level SDK (EInkDisplay, InputManager, BatteryMonitor, SDCardManager)
|
* freeink-sdk/: Low-level SDK (EInkDisplay, InputManager, BatteryMonitor, SDCardManager)
|
||||||
* .crosspoint/: SD-based binary cache for EPUB metadata and pre-rendered layout sections
|
* .crosspoint/: SD-based binary cache for EPUB metadata and pre-rendered layout sections
|
||||||
|
|
||||||
### Hardware Abstraction Layer (HAL)
|
### Hardware Abstraction Layer (HAL)
|
||||||
|
|||||||
@@ -67,10 +67,6 @@ USB port or browser before assuming the device is locked. Only reach for the unl
|
|||||||
> Flashing any other firmware on a USB-locked device may **permanently brick the device** or leave it **permanently
|
> Flashing any other firmware on a USB-locked device may **permanently brick the device** or leave it **permanently
|
||||||
> stuck on that firmware with no recovery path**. Once USB flashing is re-locked, your only way back is via OTA, and if
|
> stuck on that firmware with no recovery path**. Once USB flashing is re-locked, your only way back is via OTA, and if
|
||||||
> the firmware you flashed doesn't support OTA, **there is no way out**.
|
> the firmware you flashed doesn't support OTA, **there is no way out**.
|
||||||
>
|
|
||||||
> **The Papyrix fork has removed OTA update support from its code.** If you flash Papyrix onto a
|
|
||||||
> USB-locked unit, you will have **zero update or recovery path** and will be stuck on it forever. **Do not flash
|
|
||||||
> Papyrix (or any other unsupported firmware) on a locked device.**
|
|
||||||
|
|
||||||
## Install firmware
|
## Install firmware
|
||||||
|
|
||||||
@@ -249,7 +245,7 @@ One of the best things about open source is that anyone can take the code in a d
|
|||||||
|
|
||||||
- [papyrix-reader](https://github.com/bigbag/papyrix-reader) — Adds FB2 and MD format support. Actively maintained with Arabic script support. Custom themes via SD card.
|
- [papyrix-reader](https://github.com/bigbag/papyrix-reader) — Adds FB2 and MD format support. Actively maintained with Arabic script support. Custom themes via SD card.
|
||||||
|
|
||||||
- [crosspet](https://github.com/trilwu/crosspet) — A Vietnamese fork that adds a Tamagotchi-style virtual chicken that grows based on your reading milestones (pages read, streaks, care). Also: Flashcards, Weather, Pomodoro timer, and mini-games.
|
- ~~[crosspet](https://github.com/trilwu/crosspet) — A Vietnamese fork that adds a Tamagotchi-style virtual chicken that grows based on your reading milestones (pages read, streaks, care). Also: Flashcards, Weather, Pomodoro timer, and mini-games.~~ (Unmaintained)
|
||||||
|
|
||||||
- [crosspoint-reader-cjk](https://github.com/aBER0724/crosspoint-reader-cjk) — Purpose-built for Chinese, Japanese, and Korean reading.
|
- [crosspoint-reader-cjk](https://github.com/aBER0724/crosspoint-reader-cjk) — Purpose-built for Chinese, Japanese, and Korean reading.
|
||||||
|
|
||||||
|
|||||||
+60
-22
@@ -5,6 +5,7 @@ Welcome to the **CrossPoint** firmware. This guide outlines the hardware control
|
|||||||
- [CrossPoint User Guide](#crosspoint-user-guide)
|
- [CrossPoint User Guide](#crosspoint-user-guide)
|
||||||
- [1. Hardware Overview](#1-hardware-overview)
|
- [1. Hardware Overview](#1-hardware-overview)
|
||||||
- [Button Layout](#button-layout)
|
- [Button Layout](#button-layout)
|
||||||
|
- [Taking a Screenshot](#taking-a-screenshot)
|
||||||
- [2. Power \& Startup](#2-power--startup)
|
- [2. Power \& Startup](#2-power--startup)
|
||||||
- [Power On / Off](#power-on--off)
|
- [Power On / Off](#power-on--off)
|
||||||
- [First Launch](#first-launch)
|
- [First Launch](#first-launch)
|
||||||
@@ -14,7 +15,11 @@ Welcome to the **CrossPoint** firmware. This guide outlines the hardware control
|
|||||||
- [3.3 Browse Files Screen](#33-browse-files-screen)
|
- [3.3 Browse Files Screen](#33-browse-files-screen)
|
||||||
- [3.4 Recent Books Screen](#34-recent-books-screen)
|
- [3.4 Recent Books Screen](#34-recent-books-screen)
|
||||||
- [3.5 File Transfer Screen](#35-file-transfer-screen)
|
- [3.5 File Transfer Screen](#35-file-transfer-screen)
|
||||||
- [3.5.1 Calibre Wireless Transfers](#351-calibre-wireless-transfers)
|
- [3.5.1 Calibre Wireless Transfers](#351-calibre-wireless-transfers)
|
||||||
|
- [Installing the Plugin in Calibre](#installing-the-plugin-in-calibre)
|
||||||
|
- [Configuring the CrossPoint Plugin in Calibre](#configuring-the-crosspoint-plugin-in-calibre)
|
||||||
|
- [Uploading Books](#uploading-books)
|
||||||
|
- [Removing a Book](#removing-a-book)
|
||||||
- [3.6 Settings](#36-settings)
|
- [3.6 Settings](#36-settings)
|
||||||
- [3.6.1 Display](#361-display)
|
- [3.6.1 Display](#361-display)
|
||||||
- [3.6.2 Reader](#362-reader)
|
- [3.6.2 Reader](#362-reader)
|
||||||
@@ -23,21 +28,25 @@ Welcome to the **CrossPoint** firmware. This guide outlines the hardware control
|
|||||||
- [3.6.5 OPDS Servers (Multiple Libraries)](#365-opds-servers-multiple-libraries)
|
- [3.6.5 OPDS Servers (Multiple Libraries)](#365-opds-servers-multiple-libraries)
|
||||||
- [3.6.6 Web Settings (Wi-Fi + OPDS)](#366-web-settings-wi-fi--opds)
|
- [3.6.6 Web Settings (Wi-Fi + OPDS)](#366-web-settings-wi-fi--opds)
|
||||||
- [3.6.7 KOReader Sync Quick Setup](#367-koreader-sync-quick-setup)
|
- [3.6.7 KOReader Sync Quick Setup](#367-koreader-sync-quick-setup)
|
||||||
|
- [Option A: Free Public Server (`sync.koreader.rocks`)](#option-a-free-public-server-synckoreaderrocks)
|
||||||
|
- [Option B: Self-Hosted Server (Docker Compose)](#option-b-self-hosted-server-docker-compose)
|
||||||
- [3.7 Sleep Screen](#37-sleep-screen)
|
- [3.7 Sleep Screen](#37-sleep-screen)
|
||||||
|
- [Cover settings](#cover-settings)
|
||||||
|
- [Custom images](#custom-images)
|
||||||
- [3.8 Custom Fonts (SD Card)](#38-custom-fonts-sd-card)
|
- [3.8 Custom Fonts (SD Card)](#38-custom-fonts-sd-card)
|
||||||
- [4. Reading Mode](#4-reading-mode)
|
- [4. Reading Mode](#4-reading-mode)
|
||||||
- [Page Turning](#page-turning)
|
- [Page Turning](#page-turning)
|
||||||
- [Chapter Navigation](#chapter-navigation)
|
- [Chapter Navigation](#chapter-navigation)
|
||||||
- [Auto Page Turn](#auto-page-turn)
|
- [Auto Page Turn](#auto-page-turn)
|
||||||
- [Tilt Page Turn (X3 only)](#tilt-page-turn-x3-only)
|
- [Tilt Page Turn (X3 only)](#tilt-page-turn-x3-only)
|
||||||
- [Footnote Navigation](#footnote-navigation)
|
- [Footnote Navigation](#footnote-navigation)
|
||||||
- [System Navigation](#system-navigation)
|
- [System Navigation](#system-navigation)
|
||||||
- [Supported Languages](#supported-languages)
|
- [Supported Languages](#supported-languages)
|
||||||
- [5. Reader Menu](#5-reader-menu)
|
- [5. Reader Menu](#5-reader-menu)
|
||||||
- [5.1 Chapter Selection](#51-chapter-selection)
|
- [5.1 Chapter Selection](#51-chapter-selection)
|
||||||
- [5.2 Bookmarks](#52-bookmarks)
|
- [5.2 Bookmarks](#52-bookmarks)
|
||||||
- [6. Current Limitations & Roadmap](#6-current-limitations--roadmap)
|
- [6. Current Limitations \& Roadmap](#6-current-limitations--roadmap)
|
||||||
- [7. Troubleshooting Issues & Escaping Bootloop](#7-troubleshooting-issues--escaping-bootloop)
|
- [7. Troubleshooting Issues \& Escaping Bootloop](#7-troubleshooting-issues--escaping-bootloop)
|
||||||
|
|
||||||
## 1. Hardware Overview
|
## 1. Hardware Overview
|
||||||
|
|
||||||
@@ -122,19 +131,43 @@ A **Wi-Fi signal strength indicator** (dBm) is displayed on-screen during joined
|
|||||||
|
|
||||||
CrossPoint supports sending books from Calibre using the CrossPoint Reader device plugin.
|
CrossPoint supports sending books from Calibre using the CrossPoint Reader device plugin.
|
||||||
|
|
||||||
1. Install the plugin in Calibre:
|
#### Installing the Plugin in Calibre
|
||||||
|
|
||||||
- Head to https://github.com/crosspoint-reader/calibre-plugins/releases to download the latest version of the crosspoint_reader plugin.
|
|
||||||
|
|
||||||
- Download the zip file.
|
|
||||||
|
|
||||||
- Open Calibre → Preferences → Plugins → Load plugin from file → Select the zip file.
|
|
||||||
|
|
||||||
2. On the device: File Transfer -> Calibre Wireless, then join a network.
|
If you don't already have the plugin installed:
|
||||||
|
|
||||||
3. Make sure your computer is on the same Wi-Fi network.
|
1. Head to https://github.com/crosspoint-reader/calibre-plugins/releases to download the latest version of the crosspoint_reader plugin.
|
||||||
|
2. Download the zip file.
|
||||||
|
3. Open Calibre → Preferences → Plugins → Load plugin from file → Select the zip file.
|
||||||
|
4. Restart Calibre.
|
||||||
|
|
||||||
4. In Calibre, click "Send to device" to transfer books.
|
#### Configuring the CrossPoint Plugin in Calibre
|
||||||
|
1. In Calibre select Preferences.
|
||||||
|
2. In the Preferences dialog select Plugins.
|
||||||
|
3. In Plugins search for "crosspoint".
|
||||||
|
4. Click on "Customize plugin".
|
||||||
|
5. Update the value for "Host" to match the IP for your device.
|
||||||
|
6. Leave the other settings as they are.
|
||||||
|
7. [optional] Modify the "Upload path" to point to a subfolder other than the root "/" folder. Enter this as a path relative to the root folder. Example: `/mybooks`
|
||||||
|
8. Restart Calibre.
|
||||||
|
|
||||||
|
<img width="420" height="385" alt="Image" src="https://github.com/user-attachments/assets/01fc7e33-a9a7-48ba-9e26-2e68d1f9daec" />
|
||||||
|
|
||||||
|
#### Uploading Books
|
||||||
|
|
||||||
|
To upload a book using the CrossPoint plugin in Calibre:
|
||||||
|
|
||||||
|
1. On the device: File Transfer -> Calibre Wireless, then join a network.
|
||||||
|
2. Select one or more books.
|
||||||
|
3. Right-click on that selection.
|
||||||
|
4. Select "Send to Device" > "Send to main memory"
|
||||||
|
|
||||||
|
The CrossPoint plugin will connect to your device, create a folder for the book's author in the root folder (or the folder you configured for the plugin), then copy the book into that folder.
|
||||||
|
|
||||||
|
<img width="783" height="310" alt="Image" src="https://github.com/user-attachments/assets/741b0909-2e1d-4f16-8af0-2c43fbda5ce6" />
|
||||||
|
|
||||||
|
#### Removing a Book
|
||||||
|
|
||||||
|
Books cannot be removed from your device through Calibre. Use the web interface instead.
|
||||||
|
|
||||||
### 3.6 Settings
|
### 3.6 Settings
|
||||||
|
|
||||||
@@ -150,6 +183,7 @@ The Settings screen allows you to configure the device's behavior. There are a f
|
|||||||
- "Cover" - The book cover image (Note: this is experimental and may not work as expected)
|
- "Cover" - The book cover image (Note: this is experimental and may not work as expected)
|
||||||
- "None" - A blank screen
|
- "None" - A blank screen
|
||||||
- "Cover + Custom" - The book cover image while actively reading, falls back to "Custom" behavior otherwise
|
- "Cover + Custom" - The book cover image while actively reading, falls back to "Custom" behavior otherwise
|
||||||
|
- "Quick resume" - The text of the last page read will be displayed on the sleep screen and a moon icon is shown on the edge of the screen. Waking up the device will return to the same page of the opened book. This is useful for quickly resuming reading without waiting for the device to fully wake up and load the book.
|
||||||
|
|
||||||
- **Sleep Screen Cover Mode**: How to display the book cover when "Cover" sleep screen is selected:
|
- **Sleep Screen Cover Mode**: How to display the book cover when "Cover" sleep screen is selected:
|
||||||
|
|
||||||
@@ -162,6 +196,8 @@ The Settings screen allows you to configure the device's behavior. There are a f
|
|||||||
- "Contrast" - The image will be displayed as a black & white image without grayscale conversion
|
- "Contrast" - The image will be displayed as a black & white image without grayscale conversion
|
||||||
- "Inverted" - The image will be inverted as in white & black and will be displayed without grayscale conversion
|
- "Inverted" - The image will be inverted as in white & black and will be displayed without grayscale conversion
|
||||||
|
|
||||||
|
- **Quick Resume on Timeout**: Whether to enable the "Quick Resume" sleep screen when the device goes to sleep due to inactivity (System > Time to Sleep). This is useful for quickly resuming reading without waiting for the device to fully wake up and load the book. This overwrites the Sleep Screen Cover Mode when enabled.
|
||||||
|
|
||||||
- **Status Bar**: Configure the status bar displayed while reading:
|
- **Status Bar**: Configure the status bar displayed while reading:
|
||||||
|
|
||||||
- "None" - No status bar
|
- "None" - No status bar
|
||||||
@@ -527,6 +563,8 @@ On the **Xteink X3**, the gyroscope can be used to turn pages by tilting the dev
|
|||||||
|
|
||||||
When reading an EPUB that contains footnotes, you can navigate to the footnote text by selecting the footnote reference in the book. From the footnote, you can return to your original reading position.
|
When reading an EPUB that contains footnotes, you can navigate to the footnote text by selecting the footnote reference in the book. From the footnote, you can return to your original reading position.
|
||||||
|
|
||||||
|
If the device goes to sleep or you close the book while viewing a footnote, the book reopens to your original reading position, not the footnote.
|
||||||
|
|
||||||
### System Navigation
|
### System Navigation
|
||||||
|
|
||||||
* **Return to Home:** Press the **Back** button to close the book and return to the **[Home](#31-home-screen)** screen.
|
* **Return to Home:** Press the **Back** button to close the book and return to the **[Home](#31-home-screen)** screen.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Formats all C/C++ source and header files in the repository, excluding
|
Formats all C/C++ source and header files in the repository, excluding
|
||||||
generated, vendored, and build directories (open-x4-sdk, builtinFonts,
|
generated, vendored, and build directories (freeink-sdk, builtinFonts,
|
||||||
hyphenation tries, uzlib, .pio, *.generated.h).
|
hyphenation tries, uzlib, .pio, *.generated.h).
|
||||||
|
|
||||||
The clang-format binary path is resolved once and cached in
|
The clang-format binary path is resolved once and cached in
|
||||||
@@ -92,7 +92,7 @@ function Resolve-ClangFormat {
|
|||||||
$clangFormat = Resolve-ClangFormat
|
$clangFormat = Resolve-ClangFormat
|
||||||
|
|
||||||
$exclude = @(
|
$exclude = @(
|
||||||
'open-x4-sdk'
|
'freeink-sdk'
|
||||||
'lib\EpdFont\builtinFonts'
|
'lib\EpdFont\builtinFonts'
|
||||||
'lib\Epub\Epub\hyphenation\generated'
|
'lib\Epub\Epub\hyphenation\generated'
|
||||||
'lib\uzlib'
|
'lib\uzlib'
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ At a high level, it is firmware that uses an activity-driven application archite
|
|||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
graph TD
|
graph TD
|
||||||
A[Hardware: ESP32-C3 + SD + E-ink + Buttons] --> B[open-x4-sdk]
|
A[Hardware: ESP32-C3 + SD + E-ink + Buttons] --> B[freeink-sdk]
|
||||||
B --> C[lib/hal wrappers]
|
B --> C[lib/hal wrappers]
|
||||||
C --> D[src/main.cpp runtime loop]
|
C --> D[src/main.cpp runtime loop]
|
||||||
D --> E[Activities layer]
|
D --> E[Activities layer]
|
||||||
@@ -195,10 +195,10 @@ When editing related source assets, regenerate via normal build steps/scripts.
|
|||||||
- `src/`: app orchestration, settings/state, and activity implementations
|
- `src/`: app orchestration, settings/state, and activity implementations
|
||||||
- `src/network/`: web server and OTA/update networking
|
- `src/network/`: web server and OTA/update networking
|
||||||
- `src/components/`: theming and shared UI components
|
- `src/components/`: theming and shared UI components
|
||||||
- `lib/hal/`: hardware abstraction wrappers around open-x4-sdk
|
- `lib/hal/`: hardware abstraction wrappers around freeink-sdk
|
||||||
- `lib/Epub/`: EPUB parser, layout, CSS handling, and hyphenation
|
- `lib/Epub/`: EPUB parser, layout, CSS handling, and hyphenation
|
||||||
- `lib/`: supporting libraries (fonts, text, filesystem helpers, etc.)
|
- `lib/`: supporting libraries (fonts, text, filesystem helpers, etc.)
|
||||||
- `open-x4-sdk/`: hardware SDK submodule (display, input, storage, battery)
|
- `freeink-sdk/`: hardware SDK submodule (display, input, storage, battery). Docs: https://freeink.org/docs
|
||||||
- `docs/`: user and technical documentation
|
- `docs/`: user and technical documentation
|
||||||
|
|
||||||
## Embedded constraints that shape design
|
## Embedded constraints that shape design
|
||||||
|
|||||||
@@ -90,13 +90,13 @@ if (parsedSize != fileSize) {
|
|||||||
|
|
||||||
## `section.bin`
|
## `section.bin`
|
||||||
|
|
||||||
### Version 25
|
### Version 28
|
||||||
|
|
||||||
Each file in `sections/*.bin` stores one laid-out spine section. The header is
|
Each file in `sections/*.bin` stores one laid-out spine section. The header is
|
||||||
also the cache-busting key: if any layout-affecting setting differs from the
|
also the cache-busting key: if any layout-affecting setting differs from the
|
||||||
current reader settings, the section is discarded and rebuilt.
|
current reader settings, the section is discarded and rebuilt.
|
||||||
|
|
||||||
Version 25 includes:
|
Version 28 includes:
|
||||||
|
|
||||||
- cache-busting fields for paragraph alignment, hyphenation, embedded CSS,
|
- cache-busting fields for paragraph alignment, hyphenation, embedded CSS,
|
||||||
image rendering mode, and Focus Reading
|
image rendering mode, and Focus Reading
|
||||||
@@ -105,6 +105,8 @@ Version 25 includes:
|
|||||||
- paragraph and list-item LUTs used by KOReader sync page refinement
|
- paragraph and list-item LUTs used by KOReader sync page refinement
|
||||||
- optional per-word Focus Reading split metadata
|
- optional per-word Focus Reading split metadata
|
||||||
- per-page footnote entries
|
- per-page footnote entries
|
||||||
|
- serialized word style bits for underline, strikethrough, superscript, and
|
||||||
|
subscript
|
||||||
|
|
||||||
ImHex pattern:
|
ImHex pattern:
|
||||||
|
|
||||||
@@ -113,7 +115,7 @@ import std.mem;
|
|||||||
import std.string;
|
import std.string;
|
||||||
import std.core;
|
import std.core;
|
||||||
|
|
||||||
#define EXPECTED_VERSION 25
|
#define EXPECTED_VERSION 28
|
||||||
#define MAX_STRING_LENGTH 65535
|
#define MAX_STRING_LENGTH 65535
|
||||||
#define FOOTNOTE_NUMBER_LEN 32
|
#define FOOTNOTE_NUMBER_LEN 32
|
||||||
#define FOOTNOTE_HREF_LEN 96
|
#define FOOTNOTE_HREF_LEN 96
|
||||||
|
|||||||
+1
-1
Submodule freeink-sdk updated: c3b3ab3d11...f611d71d8e.
@@ -1,7 +1,7 @@
|
|||||||
#include "EpdFontFamily.h"
|
#include "EpdFontFamily.h"
|
||||||
|
|
||||||
const EpdFont* EpdFontFamily::getFont(const Style style) const {
|
const EpdFont* EpdFontFamily::getFont(const Style style) const {
|
||||||
// Extract font style bits (ignore UNDERLINE bit for font selection)
|
// Extract font style bits; render-time overlay bits do not affect font selection.
|
||||||
const bool hasBold = (style & BOLD) != 0;
|
const bool hasBold = (style & BOLD) != 0;
|
||||||
const bool hasItalic = (style & ITALIC) != 0;
|
const bool hasItalic = (style & ITALIC) != 0;
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class EpdFontFamily {
|
|||||||
SUP = 16, // superscript: glyph scaled 50%, raised ~40% of ascender
|
SUP = 16, // superscript: glyph scaled 50%, raised ~40% of ascender
|
||||||
SUB = 32, // subscript: glyph scaled 50%, lowered ~25% of ascender
|
SUB = 32, // subscript: glyph scaled 50%, lowered ~25% of ascender
|
||||||
};
|
};
|
||||||
|
static constexpr uint8_t TEXT_DECORATION_MASK = static_cast<uint8_t>(UNDERLINE | STRIKETHROUGH);
|
||||||
|
|
||||||
explicit EpdFontFamily(const EpdFont* regular, const EpdFont* bold = nullptr, const EpdFont* italic = nullptr,
|
explicit EpdFontFamily(const EpdFont* regular, const EpdFont* bold = nullptr, const EpdFont* italic = nullptr,
|
||||||
const EpdFont* boldItalic = nullptr)
|
const EpdFont* boldItalic = nullptr)
|
||||||
@@ -27,6 +28,9 @@ class EpdFontFamily {
|
|||||||
const EpdGlyph* getGlyph(uint32_t cp, Style style = REGULAR) const;
|
const EpdGlyph* getGlyph(uint32_t cp, Style style = REGULAR) const;
|
||||||
int8_t getKerning(uint32_t leftCp, uint32_t rightCp, Style style = REGULAR) const;
|
int8_t getKerning(uint32_t leftCp, uint32_t rightCp, Style style = REGULAR) const;
|
||||||
uint32_t applyLigatures(uint32_t cp, const char*& text, Style style = REGULAR) const;
|
uint32_t applyLigatures(uint32_t cp, const char*& text, Style style = REGULAR) const;
|
||||||
|
static constexpr bool hasTextDecoration(const Style style) {
|
||||||
|
return (static_cast<uint8_t>(style) & TEXT_DECORATION_MASK) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const EpdFont* regular;
|
const EpdFont* regular;
|
||||||
|
|||||||
@@ -19,6 +19,26 @@ const SdCardFontFileInfo* SdCardFontFamilyInfo::findClosestReaderSize(const uint
|
|||||||
const uint8_t style) const {
|
const uint8_t style) const {
|
||||||
if (files.empty()) return nullptr;
|
if (files.empty()) return nullptr;
|
||||||
|
|
||||||
|
// Collect sizes matching the requested style, sorted ascending.
|
||||||
|
std::vector<uint8_t> sizes;
|
||||||
|
for (const auto& f : files) {
|
||||||
|
if (f.style != style) continue;
|
||||||
|
sizes.push_back(f.pointSize);
|
||||||
|
}
|
||||||
|
if (sizes.empty()) return nullptr;
|
||||||
|
std::sort(sizes.begin(), sizes.end());
|
||||||
|
|
||||||
|
// When the family provides at least 4 sizes, use ordinal (index-based)
|
||||||
|
// selection so custom-built font sets (e.g. 10/12/14/16) map SMALL to
|
||||||
|
// the smallest file, not to a hardcoded 12pt target.
|
||||||
|
if (sizes.size() >= 4) {
|
||||||
|
uint8_t idx = fontSizeEnum;
|
||||||
|
if (idx >= sizes.size()) idx = sizes.size() - 1;
|
||||||
|
return findFile(sizes[idx], style);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fewer sizes than enum slots (e.g. CJK packs with only 2-3 sizes):
|
||||||
|
// fall back to closest-match against the built-in reader targets.
|
||||||
uint8_t target = 14;
|
uint8_t target = 14;
|
||||||
switch (fontSizeEnum) {
|
switch (fontSizeEnum) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
@@ -37,5 +37,3 @@
|
|||||||
#include <builtinFonts/ubuntu_10_regular.h>
|
#include <builtinFonts/ubuntu_10_regular.h>
|
||||||
#include <builtinFonts/ubuntu_12_bold.h>
|
#include <builtinFonts/ubuntu_12_bold.h>
|
||||||
#include <builtinFonts/ubuntu_12_regular.h>
|
#include <builtinFonts/ubuntu_12_regular.h>
|
||||||
#include <builtinFonts/ubuntu_14_bold.h>
|
|
||||||
#include <builtinFonts/ubuntu_14_regular.h>
|
|
||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -94,13 +94,6 @@ ruby -rdigest -e 'puts [
|
|||||||
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
||||||
))"
|
))"
|
||||||
|
|
||||||
echo "#define UI_14_FONT_ID ($(
|
|
||||||
ruby -rdigest -e 'puts [
|
|
||||||
"./ubuntu_14_regular.h",
|
|
||||||
"./ubuntu_14_bold.h",
|
|
||||||
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
|
||||||
))"
|
|
||||||
|
|
||||||
echo "#define SMALL_FONT_ID ($(
|
echo "#define SMALL_FONT_ID ($(
|
||||||
ruby -rdigest -e 'puts [
|
ruby -rdigest -e 'puts [
|
||||||
"./notosans_8_regular.h",
|
"./notosans_8_regular.h",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
import socket
|
||||||
import urllib.request
|
import urllib.request
|
||||||
from concurrent.futures import ProcessPoolExecutor, as_completed
|
from concurrent.futures import ProcessPoolExecutor, as_completed
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -49,17 +50,44 @@ INSTANCE_DIR = SCRIPT_DIR / "instanced_fonts"
|
|||||||
DEFAULT_FALLBACK_FONT = EPDFONTS_DIR / "builtinFonts/source/NotoSans/NotoSans-Regular.ttf"
|
DEFAULT_FALLBACK_FONT = EPDFONTS_DIR / "builtinFonts/source/NotoSans/NotoSans-Regular.ttf"
|
||||||
|
|
||||||
|
|
||||||
def download_font(url: str, dest: Path) -> Path:
|
_orig_getaddrinfo = socket.getaddrinfo
|
||||||
"""Download a font file if not already cached. Returns the local path."""
|
|
||||||
|
|
||||||
|
def _ipv4_only_getaddrinfo(*args, **kwargs):
|
||||||
|
"""getaddrinfo variant that drops AAAA records (IPv4 only)."""
|
||||||
|
return [ai for ai in _orig_getaddrinfo(*args, **kwargs) if ai[0] == socket.AF_INET]
|
||||||
|
|
||||||
|
|
||||||
|
def download_font(url: str, dest: Path, retries: int = 3) -> Path:
|
||||||
|
"""Download a font file if not already cached. Returns the local path.
|
||||||
|
|
||||||
|
Some sources (e.g. mirrors.ctan.org) are round-robin redirectors that land
|
||||||
|
on a different mirror each request; a mirror may advertise an IPv6 address a
|
||||||
|
host without an IPv6 route cannot reach ([Errno 101] Network is unreachable).
|
||||||
|
Retry on failure, forcing IPv4 resolution after the first attempt.
|
||||||
|
"""
|
||||||
if dest.exists():
|
if dest.exists():
|
||||||
return dest
|
return dest
|
||||||
dest.parent.mkdir(parents=True, exist_ok=True)
|
dest.parent.mkdir(parents=True, exist_ok=True)
|
||||||
print(f" Downloading {dest.name}...")
|
print(f" Downloading {dest.name}...")
|
||||||
try:
|
last_err = None
|
||||||
urllib.request.urlretrieve(url, dest)
|
for attempt in range(1, retries + 1):
|
||||||
except Exception as e:
|
force_ipv4 = attempt > 1
|
||||||
dest.unlink(missing_ok=True)
|
if force_ipv4:
|
||||||
raise RuntimeError(f"Failed to download {url}: {e}") from e
|
socket.getaddrinfo = _ipv4_only_getaddrinfo
|
||||||
|
try:
|
||||||
|
urllib.request.urlretrieve(url, dest)
|
||||||
|
break
|
||||||
|
except Exception as e: # noqa: BLE001 - reported via RuntimeError below
|
||||||
|
last_err = e
|
||||||
|
dest.unlink(missing_ok=True)
|
||||||
|
if attempt < retries:
|
||||||
|
print(f" Attempt {attempt} failed ({e}); retrying (IPv4-only)...")
|
||||||
|
finally:
|
||||||
|
if force_ipv4:
|
||||||
|
socket.getaddrinfo = _orig_getaddrinfo
|
||||||
|
else:
|
||||||
|
raise RuntimeError(f"Failed to download {url}: {last_err}") from last_err
|
||||||
size_kb = dest.stat().st_size / 1024
|
size_kb = dest.stat().st_size / 1024
|
||||||
print(f" Downloaded {dest.name} ({size_kb:.0f} KB)")
|
print(f" Downloaded {dest.name} ({size_kb:.0f} KB)")
|
||||||
return dest
|
return dest
|
||||||
|
|||||||
@@ -28,42 +28,23 @@ for size in ${NOTOSANS_FONT_SIZES[@]}; do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# Small UI chrome (button devices, uiScale 1.0). Rendered 1-bit: crisp at these
|
|
||||||
# sizes and half the flash of 2-bit.
|
|
||||||
UI_FONT_SIZES=(10 12)
|
UI_FONT_SIZES=(10 12)
|
||||||
# Larger UI chrome substituted in on touch/high-density boards via the uiScale
|
|
||||||
# remap (see src/main.cpp setupFonts). Rendered 2-bit so it stays smooth when
|
|
||||||
# enlarged. Touch boards use uiScale 1.2, so UI_12 -> 14.4 -> 14 is the size the
|
|
||||||
# remap actually lands on; add larger sizes here if a board adopts a higher scale.
|
|
||||||
UI_FONT_SIZES_LARGE=(14)
|
|
||||||
UI_FONT_STYLES=("Regular" "Bold")
|
UI_FONT_STYLES=("Regular" "Bold")
|
||||||
|
|
||||||
# Ubuntu lacks the Latin Extended Additional block (U+1EA0-U+1EF9) used for
|
|
||||||
# Vietnamese tone marks. Append a Vietnamese-only Ubuntu cut so those glyphs are
|
|
||||||
# filled from it while every glyph Ubuntu already has stays unchanged (fontstack
|
|
||||||
# is ordered by descending priority). NotoSansHebrew fills U+05D0-U+05EA so the
|
|
||||||
# Hebrew UI translation renders in menus and settings.
|
|
||||||
generate_ui_font() {
|
|
||||||
local size="$1" style="$2" extra_flags="$3"
|
|
||||||
local font_name="ubuntu_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
|
||||||
local font_path="../builtinFonts/source/Ubuntu/Ubuntu-${style}.ttf"
|
|
||||||
local hebrew_path="../builtinFonts/source/NotoSansHebrew/NotoSansHebrew-${style}.ttf"
|
|
||||||
local viet_path="../builtinFonts/source/Ubuntu/Ubuntu-Vietnamese-${style}.ttf"
|
|
||||||
local output_path="../builtinFonts/${font_name}.h"
|
|
||||||
python fontconvert.py $font_name $size $font_path $hebrew_path $viet_path \
|
|
||||||
--additional-intervals 0x05D0,0x05EA $extra_flags > $output_path
|
|
||||||
echo "Generated $output_path"
|
|
||||||
}
|
|
||||||
|
|
||||||
for size in ${UI_FONT_SIZES[@]}; do
|
for size in ${UI_FONT_SIZES[@]}; do
|
||||||
for style in ${UI_FONT_STYLES[@]}; do
|
for style in ${UI_FONT_STYLES[@]}; do
|
||||||
generate_ui_font $size $style ""
|
font_name="ubuntu_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
||||||
done
|
font_path="../builtinFonts/source/Ubuntu/Ubuntu-${style}.ttf"
|
||||||
done
|
hebrew_path="../builtinFonts/source/NotoSansHebrew/NotoSansHebrew-${style}.ttf"
|
||||||
|
# Ubuntu lacks the Latin Extended Additional block (U+1EA0-U+1EF9) used for
|
||||||
for size in ${UI_FONT_SIZES_LARGE[@]}; do
|
# Vietnamese tone marks. Append a Vietnamese-only Ubuntu cut so those glyphs
|
||||||
for style in ${UI_FONT_STYLES[@]}; do
|
# are filled from it while every glyph Ubuntu already has stays unchanged
|
||||||
generate_ui_font $size $style "--2bit --compress"
|
# (fontstack is ordered by descending priority).
|
||||||
|
viet_path="../builtinFonts/source/Ubuntu/Ubuntu-Vietnamese-${style}.ttf"
|
||||||
|
output_path="../builtinFonts/${font_name}.h"
|
||||||
|
python fontconvert.py $font_name $size $font_path $hebrew_path $viet_path \
|
||||||
|
--additional-intervals 0x05D0,0x05EA > $output_path
|
||||||
|
echo "Generated $output_path"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ INTERVAL_PRESETS = {
|
|||||||
"ascii": [(0x0020, 0x007E)],
|
"ascii": [(0x0020, 0x007E)],
|
||||||
"latin1": [(0x0080, 0x00FF)],
|
"latin1": [(0x0080, 0x00FF)],
|
||||||
"latin-ext": [(0x0020, 0x007E), (0x0080, 0x00FF), (0x0100, 0x024F),
|
"latin-ext": [(0x0020, 0x007E), (0x0080, 0x00FF), (0x0100, 0x024F),
|
||||||
(0x1E00, 0x1EFF), (0x2000, 0x206F), (0xFB00, 0xFB06)],
|
(0x02B0, 0x02FF), (0x1E00, 0x1EFF), (0x2000, 0x206F),
|
||||||
|
(0xFB00, 0xFB06)],
|
||||||
"greek": [(0x0370, 0x03FF), (0x1F00, 0x1FFF)],
|
"greek": [(0x0370, 0x03FF), (0x1F00, 0x1FFF)],
|
||||||
"cyrillic": [(0x0400, 0x04FF), (0x0500, 0x052F)],
|
"cyrillic": [(0x0400, 0x04FF), (0x0500, 0x052F)],
|
||||||
"hebrew": [(0x0590, 0x05FF), (0xFB1D, 0xFB4F)],
|
"hebrew": [(0x0590, 0x05FF), (0xFB1D, 0xFB4F)],
|
||||||
@@ -62,7 +63,7 @@ INTERVAL_PRESETS = {
|
|||||||
# Composite preset for English-language literary fiction including scifi/popsci.
|
# Composite preset for English-language literary fiction including scifi/popsci.
|
||||||
# Greek for physics terms, math operators, geometric shapes, uncommon
|
# Greek for physics terms, math operators, geometric shapes, uncommon
|
||||||
# dialogue punctuation, CJK quote marks, miscellaneous symbols (♪♫♬), dingbats.
|
# dialogue punctuation, CJK quote marks, miscellaneous symbols (♪♫♬), dingbats.
|
||||||
"reading": [(0x0020, 0x024F), (0x0300, 0x036F), (0x0370, 0x03FF),
|
"reading": [(0x0020, 0x024F), (0x02B0, 0x02FF), (0x0300, 0x036F), (0x0370, 0x03FF),
|
||||||
(0x0400, 0x04FF), (0x1E00, 0x1EFF), (0x2000, 0x206F),
|
(0x0400, 0x04FF), (0x1E00, 0x1EFF), (0x2000, 0x206F),
|
||||||
(0x2070, 0x209F), (0x20A0, 0x20CF), (0x2150, 0x218F),
|
(0x2070, 0x209F), (0x20A0, 0x20CF), (0x2150, 0x218F),
|
||||||
(0x2190, 0x21FF), (0x2200, 0x22FF), (0x2500, 0x257F),
|
(0x2190, 0x21FF), (0x2200, 0x22FF), (0x2500, 0x257F),
|
||||||
|
|||||||
@@ -132,7 +132,16 @@ families:
|
|||||||
bold: {url: "https://raw.githubusercontent.com/impallari/Libre-Baskerville/master/fonts/ttf/LibreBaskerville-Bold.ttf"}
|
bold: {url: "https://raw.githubusercontent.com/impallari/Libre-Baskerville/master/fonts/ttf/LibreBaskerville-Bold.ttf"}
|
||||||
italic: {url: "https://raw.githubusercontent.com/impallari/Libre-Baskerville/master/fonts/ttf/LibreBaskerville-Italic.ttf"}
|
italic: {url: "https://raw.githubusercontent.com/impallari/Libre-Baskerville/master/fonts/ttf/LibreBaskerville-Italic.ttf"}
|
||||||
bolditalic: {url: "https://raw.githubusercontent.com/impallari/Libre-Baskerville/master/fonts/ttf/LibreBaskerville-BoldItalic.ttf"}
|
bolditalic: {url: "https://raw.githubusercontent.com/impallari/Libre-Baskerville/master/fonts/ttf/LibreBaskerville-BoldItalic.ttf"}
|
||||||
|
|
||||||
|
- name: Vollkorn
|
||||||
|
description: "A serif for bread and butter use by Friedrich Althausen (Latin, Greek, Cyrillic)"
|
||||||
|
intervals: latin-ext,greek,cyrillic
|
||||||
|
sizes: [12, 14, 16, 18]
|
||||||
|
styles:
|
||||||
|
regular: {url: "https://raw.githubusercontent.com/google/fonts/main/ofl/vollkorn/Vollkorn%5Bwght%5D.ttf", variable: {wght: 400}}
|
||||||
|
bold: {url: "https://raw.githubusercontent.com/google/fonts/main/ofl/vollkorn/Vollkorn%5Bwght%5D.ttf", variable: {wght: 700}}
|
||||||
|
italic: {url: "https://raw.githubusercontent.com/google/fonts/main/ofl/vollkorn/Vollkorn-Italic%5Bwght%5D.ttf", variable: {wght: 400}}
|
||||||
|
bolditalic: {url: "https://raw.githubusercontent.com/google/fonts/main/ofl/vollkorn/Vollkorn-Italic%5Bwght%5D.ttf", variable: {wght: 700}}
|
||||||
|
|
||||||
# ── Sans-serif ─────────────────────────────────────────────────────────
|
# ── Sans-serif ─────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|||||||
@@ -14,47 +14,8 @@ constexpr uint8_t BOOK_CACHE_VERSION = 8; // v8: TOC/book titles stored NFC-com
|
|||||||
constexpr char bookBinFile[] = "/book.bin";
|
constexpr char bookBinFile[] = "/book.bin";
|
||||||
constexpr char tmpSpineBinFile[] = "/spine.bin.tmp";
|
constexpr char tmpSpineBinFile[] = "/spine.bin.tmp";
|
||||||
constexpr char tmpTocBinFile[] = "/toc.bin.tmp";
|
constexpr char tmpTocBinFile[] = "/toc.bin.tmp";
|
||||||
constexpr uint32_t MAX_CACHE_STRING_LEN = 4096;
|
|
||||||
|
|
||||||
bool readStringBounded(HalFile& file, std::string& out, const uint32_t maxLen = MAX_CACHE_STRING_LEN) {
|
|
||||||
uint32_t len = 0;
|
|
||||||
if (file.read(&len, sizeof(len)) != static_cast<int>(sizeof(len))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (len > maxLen || len > static_cast<uint32_t>(file.available())) {
|
|
||||||
LOG_ERR("BMC", "Invalid cache string length: %lu (max=%lu available=%d)", static_cast<unsigned long>(len),
|
|
||||||
static_cast<unsigned long>(maxLen), file.available());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
out.clear();
|
|
||||||
if (len == 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
out.resize(len);
|
|
||||||
return file.read(out.data(), len) == static_cast<int>(len);
|
|
||||||
}
|
|
||||||
|
|
||||||
class CacheIoLock {
|
|
||||||
public:
|
|
||||||
explicit CacheIoLock(SemaphoreHandle_t mutex) : mutex(mutex) {
|
|
||||||
if (mutex) xSemaphoreTakeRecursive(mutex, portMAX_DELAY);
|
|
||||||
}
|
|
||||||
~CacheIoLock() {
|
|
||||||
if (mutex) xSemaphoreGiveRecursive(mutex);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
SemaphoreHandle_t mutex;
|
|
||||||
};
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
BookMetadataCache::~BookMetadataCache() {
|
|
||||||
if (ioMutex) {
|
|
||||||
vSemaphoreDelete(ioMutex);
|
|
||||||
ioMutex = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ============= WRITING / BUILDING FUNCTIONS ================ */
|
/* ============= WRITING / BUILDING FUNCTIONS ================ */
|
||||||
|
|
||||||
bool BookMetadataCache::beginWrite() {
|
bool BookMetadataCache::beginWrite() {
|
||||||
@@ -414,7 +375,6 @@ void BookMetadataCache::createTocEntry(const std::string& title, const std::stri
|
|||||||
/* ============= READING / LOADING FUNCTIONS ================ */
|
/* ============= READING / LOADING FUNCTIONS ================ */
|
||||||
|
|
||||||
bool BookMetadataCache::load() {
|
bool BookMetadataCache::load() {
|
||||||
CacheIoLock ioLock(ioMutex);
|
|
||||||
if (!Storage.openFileForRead("BMC", cachePath + bookBinFile, bookFile)) {
|
if (!Storage.openFileForRead("BMC", cachePath + bookBinFile, bookFile)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -432,13 +392,11 @@ bool BookMetadataCache::load() {
|
|||||||
serialization::readPod(bookFile, spineCount);
|
serialization::readPod(bookFile, spineCount);
|
||||||
serialization::readPod(bookFile, tocCount);
|
serialization::readPod(bookFile, tocCount);
|
||||||
|
|
||||||
if (!readStringBounded(bookFile, coreMetadata.title) || !readStringBounded(bookFile, coreMetadata.author) ||
|
serialization::readString(bookFile, coreMetadata.title);
|
||||||
!readStringBounded(bookFile, coreMetadata.language) || !readStringBounded(bookFile, coreMetadata.coverItemHref) ||
|
serialization::readString(bookFile, coreMetadata.author);
|
||||||
!readStringBounded(bookFile, coreMetadata.textReferenceHref)) {
|
serialization::readString(bookFile, coreMetadata.language);
|
||||||
LOG_ERR("BMC", "Invalid cache metadata strings");
|
serialization::readString(bookFile, coreMetadata.coverItemHref);
|
||||||
bookFile.close();
|
serialization::readString(bookFile, coreMetadata.textReferenceHref);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
LOG_DBG("BMC", "Loaded cache data: %d spine, %d TOC entries", spineCount, tocCount);
|
LOG_DBG("BMC", "Loaded cache data: %d spine, %d TOC entries", spineCount, tocCount);
|
||||||
@@ -446,7 +404,6 @@ bool BookMetadataCache::load() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BookMetadataCache::SpineEntry BookMetadataCache::getSpineEntry(const int index) {
|
BookMetadataCache::SpineEntry BookMetadataCache::getSpineEntry(const int index) {
|
||||||
CacheIoLock ioLock(ioMutex);
|
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
LOG_ERR("BMC", "getSpineEntry called but cache not loaded");
|
LOG_ERR("BMC", "getSpineEntry called but cache not loaded");
|
||||||
return {};
|
return {};
|
||||||
@@ -461,16 +418,11 @@ BookMetadataCache::SpineEntry BookMetadataCache::getSpineEntry(const int index)
|
|||||||
bookFile.seek(lutOffset + sizeof(uint32_t) * index);
|
bookFile.seek(lutOffset + sizeof(uint32_t) * index);
|
||||||
uint32_t spineEntryPos;
|
uint32_t spineEntryPos;
|
||||||
serialization::readPod(bookFile, spineEntryPos);
|
serialization::readPod(bookFile, spineEntryPos);
|
||||||
if (spineEntryPos >= bookFile.size()) {
|
|
||||||
LOG_ERR("BMC", "Spine entry offset out of range: %lu", static_cast<unsigned long>(spineEntryPos));
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
bookFile.seek(spineEntryPos);
|
bookFile.seek(spineEntryPos);
|
||||||
return readSpineEntry(bookFile);
|
return readSpineEntry(bookFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
BookMetadataCache::TocEntry BookMetadataCache::getTocEntry(const int index) {
|
BookMetadataCache::TocEntry BookMetadataCache::getTocEntry(const int index) {
|
||||||
CacheIoLock ioLock(ioMutex);
|
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
LOG_ERR("BMC", "getTocEntry called but cache not loaded");
|
LOG_ERR("BMC", "getTocEntry called but cache not loaded");
|
||||||
return {};
|
return {};
|
||||||
@@ -485,34 +437,24 @@ BookMetadataCache::TocEntry BookMetadataCache::getTocEntry(const int index) {
|
|||||||
bookFile.seek(lutOffset + sizeof(uint32_t) * spineCount + sizeof(uint32_t) * index);
|
bookFile.seek(lutOffset + sizeof(uint32_t) * spineCount + sizeof(uint32_t) * index);
|
||||||
uint32_t tocEntryPos;
|
uint32_t tocEntryPos;
|
||||||
serialization::readPod(bookFile, tocEntryPos);
|
serialization::readPod(bookFile, tocEntryPos);
|
||||||
if (tocEntryPos >= bookFile.size()) {
|
|
||||||
LOG_ERR("BMC", "TOC entry offset out of range: %lu", static_cast<unsigned long>(tocEntryPos));
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
bookFile.seek(tocEntryPos);
|
bookFile.seek(tocEntryPos);
|
||||||
return readTocEntry(bookFile);
|
return readTocEntry(bookFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
BookMetadataCache::SpineEntry BookMetadataCache::readSpineEntry(HalFile& file) const {
|
BookMetadataCache::SpineEntry BookMetadataCache::readSpineEntry(HalFile& file) const {
|
||||||
SpineEntry entry;
|
SpineEntry entry;
|
||||||
if (!readStringBounded(file, entry.href) ||
|
serialization::readString(file, entry.href);
|
||||||
file.read(&entry.cumulativeSize, sizeof(entry.cumulativeSize)) !=
|
serialization::readPod(file, entry.cumulativeSize);
|
||||||
static_cast<int>(sizeof(entry.cumulativeSize)) ||
|
serialization::readPod(file, entry.tocIndex);
|
||||||
file.read(&entry.tocIndex, sizeof(entry.tocIndex)) != static_cast<int>(sizeof(entry.tocIndex))) {
|
|
||||||
LOG_ERR("BMC", "Invalid spine cache entry");
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
BookMetadataCache::TocEntry BookMetadataCache::readTocEntry(HalFile& file) const {
|
BookMetadataCache::TocEntry BookMetadataCache::readTocEntry(HalFile& file) const {
|
||||||
TocEntry entry;
|
TocEntry entry;
|
||||||
if (!readStringBounded(file, entry.title) || !readStringBounded(file, entry.href) ||
|
serialization::readString(file, entry.title);
|
||||||
!readStringBounded(file, entry.anchor) ||
|
serialization::readString(file, entry.href);
|
||||||
file.read(&entry.level, sizeof(entry.level)) != static_cast<int>(sizeof(entry.level)) ||
|
serialization::readString(file, entry.anchor);
|
||||||
file.read(&entry.spineIndex, sizeof(entry.spineIndex)) != static_cast<int>(sizeof(entry.spineIndex))) {
|
serialization::readPod(file, entry.level);
|
||||||
LOG_ERR("BMC", "Invalid TOC cache entry");
|
serialization::readPod(file, entry.spineIndex);
|
||||||
return {};
|
|
||||||
}
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <HalStorage.h>
|
#include <HalStorage.h>
|
||||||
#include <freertos/semphr.h>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
@@ -55,7 +54,6 @@ class BookMetadataCache {
|
|||||||
// Temp file handles during build
|
// Temp file handles during build
|
||||||
HalFile spineFile;
|
HalFile spineFile;
|
||||||
HalFile tocFile;
|
HalFile tocFile;
|
||||||
SemaphoreHandle_t ioMutex;
|
|
||||||
|
|
||||||
// Index for fast href→spineIndex lookup (used only for large EPUBs)
|
// Index for fast href→spineIndex lookup (used only for large EPUBs)
|
||||||
struct SpineHrefIndexEntry {
|
struct SpineHrefIndexEntry {
|
||||||
@@ -87,14 +85,8 @@ class BookMetadataCache {
|
|||||||
BookMetadata coreMetadata;
|
BookMetadata coreMetadata;
|
||||||
|
|
||||||
explicit BookMetadataCache(std::string cachePath)
|
explicit BookMetadataCache(std::string cachePath)
|
||||||
: cachePath(std::move(cachePath)),
|
: cachePath(std::move(cachePath)), lutOffset(0), spineCount(0), tocCount(0), loaded(false), buildMode(false) {}
|
||||||
lutOffset(0),
|
~BookMetadataCache() = default;
|
||||||
spineCount(0),
|
|
||||||
tocCount(0),
|
|
||||||
loaded(false),
|
|
||||||
buildMode(false),
|
|
||||||
ioMutex(xSemaphoreCreateRecursiveMutex()) {}
|
|
||||||
~BookMetadataCache();
|
|
||||||
|
|
||||||
// Building phase (stream to disk immediately)
|
// Building phase (stream to disk immediately)
|
||||||
bool beginWrite();
|
bool beginWrite();
|
||||||
|
|||||||
+20
-3
@@ -6,6 +6,20 @@
|
|||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
template <typename Predicate>
|
||||||
|
void renderFilteredPageElements(const std::vector<std::shared_ptr<PageElement>>& elements, GfxRenderer& renderer,
|
||||||
|
const int fontId, const int xOffset, const int yOffset, Predicate&& predicate) {
|
||||||
|
for (const auto& element : elements) {
|
||||||
|
if (predicate(*element)) {
|
||||||
|
element->render(renderer, fontId, xOffset, yOffset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
void PageLine::render(GfxRenderer& renderer, const int fontId, const int xOffset, const int yOffset) {
|
void PageLine::render(GfxRenderer& renderer, const int fontId, const int xOffset, const int yOffset) {
|
||||||
block->render(renderer, fontId, xPos + xOffset, yPos + yOffset);
|
block->render(renderer, fontId, xPos + xOffset, yPos + yOffset);
|
||||||
}
|
}
|
||||||
@@ -93,9 +107,12 @@ std::unique_ptr<PageHorizontalRule> PageHorizontalRule::deserialize(HalFile& fil
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Page::render(GfxRenderer& renderer, const int fontId, const int xOffset, const int yOffset) const {
|
void Page::render(GfxRenderer& renderer, const int fontId, const int xOffset, const int yOffset) const {
|
||||||
for (auto& element : elements) {
|
renderFilteredPageElements(elements, renderer, fontId, xOffset, yOffset, [](const PageElement&) { return true; });
|
||||||
element->render(renderer, fontId, xOffset, yOffset);
|
}
|
||||||
}
|
|
||||||
|
void Page::renderImages(GfxRenderer& renderer, const int fontId, const int xOffset, const int yOffset) const {
|
||||||
|
renderFilteredPageElements(elements, renderer, fontId, xOffset, yOffset,
|
||||||
|
[](const PageElement& element) { return element.getTag() == TAG_PageImage; });
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Page::serialize(HalFile& file) const {
|
bool Page::serialize(HalFile& file) const {
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ class Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void render(GfxRenderer& renderer, int fontId, int xOffset, int yOffset) const;
|
void render(GfxRenderer& renderer, int fontId, int xOffset, int yOffset) const;
|
||||||
|
void renderImages(GfxRenderer& renderer, int fontId, int xOffset, int yOffset) const;
|
||||||
bool serialize(HalFile& file) const;
|
bool serialize(HalFile& file) const;
|
||||||
static std::unique_ptr<Page> deserialize(HalFile& file);
|
static std::unique_ptr<Page> deserialize(HalFile& file);
|
||||||
|
|
||||||
|
|||||||
@@ -1006,7 +1006,10 @@ void ParsedText::extractLine(const size_t breakIndex, const int pageWidth, const
|
|||||||
int advance =
|
int advance =
|
||||||
renderer.getKerning(fontId, lastCodepoint(reorderedWordsScratch[wordIdx]),
|
renderer.getKerning(fontId, lastCodepoint(reorderedWordsScratch[wordIdx]),
|
||||||
firstCodepoint(reorderedWordsScratch[wordIdx + 1]), reorderedStylesScratch[wordIdx]);
|
firstCodepoint(reorderedWordsScratch[wordIdx + 1]), reorderedStylesScratch[wordIdx]);
|
||||||
if (reorderedWordsScratch[wordIdx] == " " && reorderedContinuesScratch[wordIdx] &&
|
// wordIdx > 0 mirrors the gap accounting above (which skips index 0): a leading
|
||||||
|
// no-break space must not receive justifyExtra, or the line over-stretches by one
|
||||||
|
// gap and the last word is pushed past the right margin (issue #2185).
|
||||||
|
if (wordIdx > 0 && reorderedWordsScratch[wordIdx] == " " && reorderedContinuesScratch[wordIdx] &&
|
||||||
effectiveAlignment == CssTextAlign::Justify && !isLastLine) {
|
effectiveAlignment == CssTextAlign::Justify && !isLastLine) {
|
||||||
advance += reorderedJustifyExtra;
|
advance += reorderedJustifyExtra;
|
||||||
}
|
}
|
||||||
@@ -1048,7 +1051,8 @@ void ParsedText::extractLine(const size_t breakIndex, const int pageWidth, const
|
|||||||
// Cross-boundary kerning for continuation words
|
// Cross-boundary kerning for continuation words
|
||||||
int advance = renderer.getKerning(fontId, lastCodepoint(lineWords[wordIdx]),
|
int advance = renderer.getKerning(fontId, lastCodepoint(lineWords[wordIdx]),
|
||||||
firstCodepoint(lineWords[wordIdx + 1]), lineWordStyles[wordIdx]);
|
firstCodepoint(lineWords[wordIdx + 1]), lineWordStyles[wordIdx]);
|
||||||
if (lineWords[wordIdx] == " " && continuesVec[lastBreakAt + wordIdx] &&
|
// wordIdx > 0: see the LTR branch — a leading no-break space is not a justifiable gap.
|
||||||
|
if (wordIdx > 0 && lineWords[wordIdx] == " " && continuesVec[lastBreakAt + wordIdx] &&
|
||||||
effectiveAlignment == CssTextAlign::Justify && !isLastLine) {
|
effectiveAlignment == CssTextAlign::Justify && !isLastLine) {
|
||||||
advance += justifyExtra;
|
advance += justifyExtra;
|
||||||
}
|
}
|
||||||
@@ -1086,7 +1090,10 @@ void ParsedText::extractLine(const size_t breakIndex, const int pageWidth, const
|
|||||||
int advance = wordWidths[lastBreakAt + wordIdx];
|
int advance = wordWidths[lastBreakAt + wordIdx];
|
||||||
advance += renderer.getKerning(fontId, lastCodepoint(lineWords[wordIdx]),
|
advance += renderer.getKerning(fontId, lastCodepoint(lineWords[wordIdx]),
|
||||||
firstCodepoint(lineWords[wordIdx + 1]), lineWordStyles[wordIdx]);
|
firstCodepoint(lineWords[wordIdx + 1]), lineWordStyles[wordIdx]);
|
||||||
if (lineWords[wordIdx] == " " && continuesVec[lastBreakAt + wordIdx] &&
|
// wordIdx > 0 mirrors the gap accounting above (which skips index 0): a leading
|
||||||
|
// no-break space must not receive justifyExtra, or the line over-stretches by one
|
||||||
|
// gap and the last word is pushed past the right margin (issue #2185).
|
||||||
|
if (wordIdx > 0 && lineWords[wordIdx] == " " && continuesVec[lastBreakAt + wordIdx] &&
|
||||||
effectiveAlignment == CssTextAlign::Justify && !isLastLine) {
|
effectiveAlignment == CssTextAlign::Justify && !isLastLine) {
|
||||||
advance += justifyExtra;
|
advance += justifyExtra;
|
||||||
}
|
}
|
||||||
|
|||||||
+513
-109
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <HalStorage.h>
|
#include <HalStorage.h>
|
||||||
#include <Logging.h>
|
#include <Logging.h>
|
||||||
|
#include <Memory.h>
|
||||||
#include <Serialization.h>
|
#include <Serialization.h>
|
||||||
|
|
||||||
#include "Epub/css/CssParser.h"
|
#include "Epub/css/CssParser.h"
|
||||||
@@ -10,34 +11,59 @@
|
|||||||
#include "parsers/ChapterHtmlSlimParser.h"
|
#include "parsers/ChapterHtmlSlimParser.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
// v27: words NFC-composed at layout time; bump invalidates NFD section caches.
|
// v28: text decoration bits now include line-through in serialized wordStyles.
|
||||||
constexpr uint8_t SECTION_FILE_VERSION = 27;
|
constexpr uint8_t SECTION_FILE_VERSION = 28;
|
||||||
|
// Written into the version field while a build is in progress; patched to
|
||||||
|
// SECTION_FILE_VERSION only when the build is finalized. An abandoned /
|
||||||
|
// crash-interrupted .bin therefore carries version 0, which loadSectionFile rejects
|
||||||
|
// as unknown and clears -- so an incomplete file is never mistaken for a valid one.
|
||||||
|
constexpr uint8_t SECTION_FILE_INCOMPLETE_VERSION = 0;
|
||||||
|
// Written when a build is suspended partway (reader exited or device slept mid-build).
|
||||||
|
// The file carries valid pages 0..pageCount-1, all LUTs, and a trailer with the parse
|
||||||
|
// watermark (bytesConsumed, totalBytes) appended after the li LUT. loadSectionFile
|
||||||
|
// accepts it so a resume shows those pages instantly; the reader extends it by
|
||||||
|
// rebuilding in the background. Uses the same header layout as SECTION_FILE_VERSION,
|
||||||
|
// so finalized files are untouched by this feature; older firmware treats the sentinel
|
||||||
|
// as an unknown version and rebuilds, which is a safe downgrade.
|
||||||
|
constexpr uint8_t SECTION_FILE_PARTIAL_VERSION = 0xFE;
|
||||||
constexpr uint32_t HEADER_SIZE = sizeof(uint8_t) + sizeof(int) + sizeof(float) + sizeof(bool) + sizeof(uint8_t) +
|
constexpr uint32_t HEADER_SIZE = sizeof(uint8_t) + sizeof(int) + sizeof(float) + sizeof(bool) + sizeof(uint8_t) +
|
||||||
sizeof(uint16_t) + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(bool) + sizeof(bool) +
|
sizeof(uint16_t) + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(bool) + sizeof(bool) +
|
||||||
sizeof(uint8_t) + sizeof(bool) + sizeof(uint32_t) + sizeof(uint32_t) +
|
sizeof(uint8_t) + sizeof(bool) + sizeof(uint32_t) + sizeof(uint32_t) +
|
||||||
sizeof(uint32_t) + sizeof(uint32_t);
|
sizeof(uint32_t) + sizeof(uint32_t);
|
||||||
|
|
||||||
struct PageLutEntry {
|
|
||||||
uint32_t fileOffset;
|
|
||||||
uint16_t paragraphIndex;
|
|
||||||
uint16_t listItemIndex;
|
|
||||||
};
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
// Out-of-line so the unique_ptr<ChapterHtmlSlimParser> in BuildContext can be
|
||||||
|
// constructed/destroyed where the parser's full definition is visible.
|
||||||
|
Section::Section(const std::shared_ptr<Epub>& epub, const int spineIndex, GfxRenderer& renderer)
|
||||||
|
: epub(epub),
|
||||||
|
spineIndex(spineIndex),
|
||||||
|
renderer(renderer),
|
||||||
|
filePath(epub->getCachePath() + "/sections/" + std::to_string(spineIndex) + ".bin") {}
|
||||||
|
|
||||||
|
// Suspend any in-progress build so every section.reset() / navigation / sleep path
|
||||||
|
// persists the pages already laid out as a partial .bin instead of discarding them
|
||||||
|
// (no-op once a build has completed or never started).
|
||||||
|
Section::~Section() { suspendBuild(); }
|
||||||
|
|
||||||
uint32_t Section::onPageComplete(std::unique_ptr<Page> page) {
|
uint32_t Section::onPageComplete(std::unique_ptr<Page> page) {
|
||||||
if (!file) {
|
if (!file) {
|
||||||
LOG_ERR("SCT", "File not open for writing page %d", pageCount);
|
LOG_ERR("SCT", "File not open for writing page %d", builtPageCount_);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32_t position = file.position();
|
const uint32_t position = file.position();
|
||||||
if (!page->serialize(file)) {
|
if (!page->serialize(file)) {
|
||||||
LOG_ERR("SCT", "Failed to serialize page %d", pageCount);
|
LOG_ERR("SCT", "Failed to serialize page %d", builtPageCount_);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
LOG_DBG("SCT", "Page %d processed", pageCount);
|
LOG_DBG("SCT", "Page %d processed", builtPageCount_);
|
||||||
|
|
||||||
pageCount++;
|
builtPageCount_++;
|
||||||
|
// pageCount is the pages available to read: a rebuild over a partial only raises it
|
||||||
|
// once it has laid out more pages than the partial already covers.
|
||||||
|
if (builtPageCount_ > pageCount) {
|
||||||
|
pageCount = builtPageCount_;
|
||||||
|
}
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +82,9 @@ void Section::writeSectionFileHeader(const int fontId, const float lineCompressi
|
|||||||
sizeof(embeddedStyle) + sizeof(imageRendering) + sizeof(focusReadingEnabled) +
|
sizeof(embeddedStyle) + sizeof(imageRendering) + sizeof(focusReadingEnabled) +
|
||||||
sizeof(uint32_t) + sizeof(uint32_t) + sizeof(uint32_t) + sizeof(uint32_t),
|
sizeof(uint32_t) + sizeof(uint32_t) + sizeof(uint32_t) + sizeof(uint32_t),
|
||||||
"Header size mismatch");
|
"Header size mismatch");
|
||||||
serialization::writePod(file, SECTION_FILE_VERSION);
|
// Written as the incomplete sentinel; finalizeBuild() patches it to
|
||||||
|
// SECTION_FILE_VERSION as the last step, committing the file.
|
||||||
|
serialization::writePod(file, SECTION_FILE_INCOMPLETE_VERSION);
|
||||||
serialization::writePod(file, fontId);
|
serialization::writePod(file, fontId);
|
||||||
serialization::writePod(file, lineCompression);
|
serialization::writePod(file, lineCompression);
|
||||||
serialization::writePod(file, extraParagraphSpacing);
|
serialization::writePod(file, extraParagraphSpacing);
|
||||||
@@ -83,16 +111,18 @@ bool Section::loadSectionFile(const int fontId, const float lineCompression, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Match parameters
|
// Match parameters
|
||||||
|
bool filePartial = false;
|
||||||
{
|
{
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
serialization::readPod(file, version);
|
serialization::readPod(file, version);
|
||||||
if (version != SECTION_FILE_VERSION) {
|
if (version != SECTION_FILE_VERSION && version != SECTION_FILE_PARTIAL_VERSION) {
|
||||||
// Explicit close() required: member variable persists beyond function scope
|
// Explicit close() required: member variable persists beyond function scope
|
||||||
file.close();
|
file.close();
|
||||||
LOG_ERR("SCT", "Deserialization failed: Unknown version %u", version);
|
LOG_ERR("SCT", "Deserialization failed: Unknown version %u", version);
|
||||||
clearCache();
|
clearCache();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
filePartial = (version == SECTION_FILE_PARTIAL_VERSION);
|
||||||
|
|
||||||
int fileFontId;
|
int fileFontId;
|
||||||
uint16_t fileViewportWidth, fileViewportHeight;
|
uint16_t fileViewportWidth, fileViewportHeight;
|
||||||
@@ -127,14 +157,42 @@ bool Section::loadSectionFile(const int fontId, const float lineCompression, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
serialization::readPod(file, pageCount);
|
serialization::readPod(file, pageCount);
|
||||||
|
|
||||||
|
if (filePartial) {
|
||||||
|
// A partial's pageCount is the watermark of a suspended build. Read the watermark
|
||||||
|
// trailer (appended after the li LUT) so estimatedTotalPages can extrapolate.
|
||||||
|
uint32_t liLutOffset = 0;
|
||||||
|
file.seek(HEADER_SIZE - sizeof(uint32_t));
|
||||||
|
serialization::readPod(file, liLutOffset);
|
||||||
|
const uint32_t trailerOffset = liLutOffset + static_cast<uint32_t>(pageCount) * sizeof(uint16_t);
|
||||||
|
const bool trailerValid =
|
||||||
|
pageCount > 0 && liLutOffset >= HEADER_SIZE && trailerOffset + 2 * sizeof(uint32_t) <= file.size();
|
||||||
|
if (!trailerValid) {
|
||||||
|
file.close();
|
||||||
|
LOG_ERR("SCT", "Deserialization failed: malformed partial section");
|
||||||
|
clearCache();
|
||||||
|
pageCount = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
file.seek(trailerOffset);
|
||||||
|
serialization::readPod(file, partialBytesConsumed_);
|
||||||
|
serialization::readPod(file, partialTotalBytes_);
|
||||||
|
partial_ = true;
|
||||||
|
partialPageCount_ = pageCount;
|
||||||
|
}
|
||||||
|
|
||||||
// Explicit close() required: member variable persists beyond function scope
|
// Explicit close() required: member variable persists beyond function scope
|
||||||
file.close();
|
file.close();
|
||||||
LOG_DBG("SCT", "Deserialization succeeded: %d pages", pageCount);
|
LOG_DBG("SCT", "Deserialization succeeded: %d pages%s", pageCount, filePartial ? " (partial)" : "");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Your updated class method (assuming you are using the 'SD' object, which is a wrapper for a specific filesystem)
|
// Your updated class method (assuming you are using the 'SD' object, which is a wrapper for a specific filesystem)
|
||||||
bool Section::clearCache() const {
|
bool Section::clearCache() const {
|
||||||
|
const std::string tmpBin = binTmpPath();
|
||||||
|
if (Storage.exists(tmpBin.c_str())) {
|
||||||
|
Storage.remove(tmpBin.c_str());
|
||||||
|
}
|
||||||
if (!Storage.exists(filePath.c_str())) {
|
if (!Storage.exists(filePath.c_str())) {
|
||||||
LOG_DBG("SCT", "Cache does not exist, no action needed");
|
LOG_DBG("SCT", "Cache does not exist, no action needed");
|
||||||
return true;
|
return true;
|
||||||
@@ -154,8 +212,43 @@ bool Section::createSectionFile(const int fontId, const float lineCompression, c
|
|||||||
const uint16_t viewportHeight, const bool hyphenationEnabled, const bool embeddedStyle,
|
const uint16_t viewportHeight, const bool hyphenationEnabled, const bool embeddedStyle,
|
||||||
const uint8_t imageRendering, const bool focusReadingEnabled,
|
const uint8_t imageRendering, const bool focusReadingEnabled,
|
||||||
const std::function<void()>& popupFn) {
|
const std::function<void()>& popupFn) {
|
||||||
|
// One-shot build: start, then lay out the whole section in a single pass.
|
||||||
|
if (!startBuild(fontId, lineCompression, extraParagraphSpacing, paragraphAlignment, viewportWidth, viewportHeight,
|
||||||
|
hyphenationEnabled, embeddedStyle, imageRendering, focusReadingEnabled, popupFn)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!buildSomeMore(0)) { // 0 = build to completion
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return buildComplete_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Section::startBuild(const int fontId, const float lineCompression, const bool extraParagraphSpacing,
|
||||||
|
const uint8_t paragraphAlignment, const uint16_t viewportWidth, const uint16_t viewportHeight,
|
||||||
|
const bool hyphenationEnabled, const bool embeddedStyle, const uint8_t imageRendering,
|
||||||
|
const bool focusReadingEnabled, const std::function<void()>& popupFn) {
|
||||||
|
if (build_) {
|
||||||
|
LOG_ERR("SCT", "startBuild called while a build is already active");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
buildComplete_ = false;
|
||||||
|
builtPageCount_ = 0;
|
||||||
|
// Pages from a loaded partial stay readable (from filePath) while this build writes
|
||||||
|
// to the tmp .bin, so availability never drops below the partial's watermark.
|
||||||
|
pageCount = partial_ ? partialPageCount_ : 0;
|
||||||
|
|
||||||
|
// Remove a stale tmp .bin from a crash-interrupted build; this build recreates it.
|
||||||
|
{
|
||||||
|
const std::string staleTmp = binTmpPath();
|
||||||
|
if (Storage.exists(staleTmp.c_str())) {
|
||||||
|
Storage.remove(staleTmp.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const auto localPath = epub->getSpineItem(spineIndex).href;
|
const auto localPath = epub->getSpineItem(spineIndex).href;
|
||||||
const auto tmpHtmlPath = epub->getCachePath() + "/.tmp_" + std::to_string(spineIndex) + ".html";
|
const auto htmlDir = epub->getCachePath() + "/html";
|
||||||
|
const auto htmlPath = htmlDir + "/" + std::to_string(spineIndex) + ".html";
|
||||||
|
const auto tmpHtmlPath = htmlDir + "/.tmp_" + std::to_string(spineIndex) + ".html";
|
||||||
|
|
||||||
// Create cache directory if it doesn't exist
|
// Create cache directory if it doesn't exist
|
||||||
{
|
{
|
||||||
@@ -163,62 +256,101 @@ bool Section::createSectionFile(const int fontId, const float lineCompression, c
|
|||||||
Storage.mkdir(sectionsDir.c_str());
|
Storage.mkdir(sectionsDir.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retry logic for SD card timing issues
|
// Reuse the previously unzipped HTML if we already have it. The unzipped HTML is keyed only on the
|
||||||
bool success = false;
|
// book (it lives in the per-book cache dir), not on render settings, so it survives the invalidation
|
||||||
uint32_t fileSize = 0;
|
// that wipes the layout (.bin) caches when font/margin/orientation change -- rebuilds then skip zip
|
||||||
for (int attempt = 0; attempt < 3 && !success; attempt++) {
|
// inflation entirely. It's promoted by an atomic rename as soon as the inflate succeeds (below), so
|
||||||
if (attempt > 0) {
|
// even a window-only giant spine -- whose .bin never finalizes -- still caches its HTML, letting a
|
||||||
LOG_DBG("SCT", "Retrying stream (attempt %d)...", attempt + 1);
|
// reopen skip the multi-second inflate. If htmlPath exists it is known-complete.
|
||||||
delay(50); // Brief delay before retry
|
const bool reusedHtml = Storage.exists(htmlPath.c_str());
|
||||||
|
bool htmlCached = reusedHtml;
|
||||||
|
if (reusedHtml) {
|
||||||
|
LOG_DBG("SCT", "Reusing cached HTML %s", htmlPath.c_str());
|
||||||
|
} else {
|
||||||
|
Storage.mkdir(htmlDir.c_str());
|
||||||
|
|
||||||
|
// Retry logic for SD card timing issues
|
||||||
|
bool streamed = false;
|
||||||
|
uint32_t fileSize = 0;
|
||||||
|
for (int attempt = 0; attempt < 3 && !streamed; attempt++) {
|
||||||
|
if (attempt > 0) {
|
||||||
|
LOG_DBG("SCT", "Retrying stream (attempt %d)...", attempt + 1);
|
||||||
|
delay(50); // Brief delay before retry
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove any incomplete file from previous attempt before retrying
|
||||||
|
if (Storage.exists(tmpHtmlPath.c_str())) {
|
||||||
|
Storage.remove(tmpHtmlPath.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
HalFile tmpHtml;
|
||||||
|
if (!Storage.openFileForWrite("SCT", tmpHtmlPath, tmpHtml)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// Larger chunks mean far fewer SD writes inflating the HTML; a 1KB chunk turned a 584KB
|
||||||
|
// single-spine novel into ~570 tiny writes (multi-second). 8KB keeps the transient buffers
|
||||||
|
// small while cutting the write count 8x.
|
||||||
|
streamed = epub->readItemContentsToStream(localPath, tmpHtml, 8192);
|
||||||
|
fileSize = tmpHtml.size();
|
||||||
|
// Explicitly close() file before calling Storage.remove()
|
||||||
|
tmpHtml.close();
|
||||||
|
|
||||||
|
// If streaming failed, remove the incomplete file immediately
|
||||||
|
if (!streamed && Storage.exists(tmpHtmlPath.c_str())) {
|
||||||
|
Storage.remove(tmpHtmlPath.c_str());
|
||||||
|
LOG_DBG("SCT", "Removed incomplete temp file after failed attempt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove any incomplete file from previous attempt before retrying
|
if (!streamed) {
|
||||||
if (Storage.exists(tmpHtmlPath.c_str())) {
|
LOG_ERR("SCT", "Failed to stream item contents to temp file after retries");
|
||||||
Storage.remove(tmpHtmlPath.c_str());
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
HalFile tmpHtml;
|
LOG_DBG("SCT", "Streamed temp HTML to %s (%d bytes)", tmpHtmlPath.c_str(), fileSize);
|
||||||
if (!Storage.openFileForWrite("SCT", tmpHtmlPath, tmpHtml)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
success = epub->readItemContentsToStream(localPath, tmpHtml, 1024);
|
|
||||||
fileSize = tmpHtml.size();
|
|
||||||
// Explicitly close() file before calling Storage.remove()
|
|
||||||
tmpHtml.close();
|
|
||||||
|
|
||||||
// If streaming failed, remove the incomplete file immediately
|
// Promote to the persistent HTML cache immediately -- the inflate is complete and the bytes are
|
||||||
if (!success && Storage.exists(tmpHtmlPath.c_str())) {
|
// valid regardless of whether the layout build finishes, so reopening (even a window-only spine
|
||||||
Storage.remove(tmpHtmlPath.c_str());
|
// that never finalizes its .bin) skips re-inflation. If the rename fails we just parse the temp.
|
||||||
LOG_DBG("SCT", "Removed incomplete temp file after failed attempt");
|
if (Storage.rename(tmpHtmlPath.c_str(), htmlPath.c_str())) {
|
||||||
|
htmlCached = true;
|
||||||
|
} else {
|
||||||
|
LOG_DBG("SCT", "Failed to promote HTML cache; parsing from temp");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!success) {
|
if (!Storage.openFileForWrite("SCT", binTmpPath(), file)) {
|
||||||
LOG_ERR("SCT", "Failed to stream item contents to temp file after retries");
|
if (!reusedHtml) Storage.remove(tmpHtmlPath.c_str());
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_DBG("SCT", "Streamed temp HTML to %s (%d bytes)", tmpHtmlPath.c_str(), fileSize);
|
|
||||||
|
|
||||||
if (!Storage.openFileForWrite("SCT", filePath, file)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Header is written with the incomplete-version sentinel; finalizeBuild() commits it.
|
||||||
writeSectionFileHeader(fontId, lineCompression, extraParagraphSpacing, paragraphAlignment, viewportWidth,
|
writeSectionFileHeader(fontId, lineCompression, extraParagraphSpacing, paragraphAlignment, viewportWidth,
|
||||||
viewportHeight, hyphenationEnabled, embeddedStyle, imageRendering, focusReadingEnabled);
|
viewportHeight, hyphenationEnabled, embeddedStyle, imageRendering, focusReadingEnabled);
|
||||||
std::vector<PageLutEntry> lut = {};
|
|
||||||
|
auto ctx = makeUniqueNoThrow<BuildContext>();
|
||||||
|
if (!ctx) {
|
||||||
|
LOG_ERR("SCT", "OOM: BuildContext");
|
||||||
|
file.close();
|
||||||
|
Storage.remove(binTmpPath().c_str());
|
||||||
|
if (!reusedHtml) Storage.remove(tmpHtmlPath.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// htmlCached == "htmlPath is the live cache" (reused, or just promoted). finalizeBuild/abandonBuild
|
||||||
|
// then leave the cached HTML alone; only an un-promoted temp (rename failed) is theirs to clean up.
|
||||||
|
ctx->reusedHtml = htmlCached;
|
||||||
|
ctx->htmlPath = htmlPath;
|
||||||
|
ctx->tmpHtmlPath = tmpHtmlPath;
|
||||||
|
ctx->parsePath = htmlCached ? htmlPath : tmpHtmlPath;
|
||||||
|
|
||||||
// Derive the content base directory and image cache path prefix for the parser
|
// Derive the content base directory and image cache path prefix for the parser
|
||||||
size_t lastSlash = localPath.find_last_of('/');
|
const size_t lastSlash = localPath.find_last_of('/');
|
||||||
std::string contentBase = (lastSlash != std::string::npos) ? localPath.substr(0, lastSlash + 1) : "";
|
ctx->contentBase = (lastSlash != std::string::npos) ? localPath.substr(0, lastSlash + 1) : "";
|
||||||
std::string imageBasePath = epub->getCachePath() + "/img_" + std::to_string(spineIndex) + "_";
|
ctx->imageBasePath = epub->getCachePath() + "/img_" + std::to_string(spineIndex) + "_";
|
||||||
|
|
||||||
CssParser* cssParser = nullptr;
|
|
||||||
if (embeddedStyle) {
|
if (embeddedStyle) {
|
||||||
cssParser = epub->getCssParser();
|
ctx->cssParser = epub->getCssParser();
|
||||||
if (cssParser) {
|
if (ctx->cssParser && !ctx->cssParser->loadFromCache()) {
|
||||||
if (!cssParser->loadFromCache()) {
|
LOG_ERR("SCT", "Failed to load CSS from cache");
|
||||||
LOG_ERR("SCT", "Failed to load CSS from cache");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,104 +367,367 @@ bool Section::createSectionFile(const int fontId, const float lineCompression, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ChapterHtmlSlimParser visitor(
|
// The parser stores the path/contentBase/imageBasePath by reference, so they must
|
||||||
epub, tmpHtmlPath, renderer, fontId, lineCompression, extraParagraphSpacing, paragraphAlignment, viewportWidth,
|
// live in the BuildContext (which outlives the parser). The page-complete callback
|
||||||
viewportHeight, hyphenationEnabled, focusReadingEnabled,
|
// captures the BuildContext pointer to append to its in-RAM LUT; build_ owns the
|
||||||
[this, &lut](std::unique_ptr<Page> page, const uint16_t paragraphIndex, const uint16_t listItemIndex) {
|
// context for the parser's whole lifetime.
|
||||||
lut.push_back({this->onPageComplete(std::move(page)), paragraphIndex, listItemIndex});
|
BuildContext* ctxPtr = ctx.get();
|
||||||
|
ctx->parser = makeUniqueNoThrow<ChapterHtmlSlimParser>(
|
||||||
|
epub, ctxPtr->parsePath, renderer, fontId, lineCompression, extraParagraphSpacing, paragraphAlignment,
|
||||||
|
viewportWidth, viewportHeight, hyphenationEnabled, focusReadingEnabled,
|
||||||
|
[this, ctxPtr](std::unique_ptr<Page> page, const uint16_t paragraphIndex, const uint16_t listItemIndex) {
|
||||||
|
ctxPtr->lut.push_back({this->onPageComplete(std::move(page)), paragraphIndex, listItemIndex});
|
||||||
},
|
},
|
||||||
embeddedStyle, contentBase, imageBasePath, imageRendering, std::move(tocAnchors), popupFn, cssParser);
|
embeddedStyle, ctxPtr->contentBase, ctxPtr->imageBasePath, imageRendering, std::move(tocAnchors), popupFn,
|
||||||
Hyphenator::setPreferredLanguage(epub->getLanguage());
|
ctxPtr->cssParser);
|
||||||
success = visitor.parseAndBuildPages();
|
if (!ctx->parser) {
|
||||||
|
LOG_ERR("SCT", "OOM: ChapterHtmlSlimParser");
|
||||||
Storage.remove(tmpHtmlPath.c_str());
|
if (ctx->cssParser) ctx->cssParser->clear();
|
||||||
if (!success) {
|
|
||||||
LOG_ERR("SCT", "Failed to parse XML and build pages");
|
|
||||||
// Explicitly close() file before calling Storage.remove()
|
|
||||||
file.close();
|
file.close();
|
||||||
Storage.remove(filePath.c_str());
|
Storage.remove(binTmpPath().c_str());
|
||||||
if (cssParser) {
|
if (!reusedHtml) Storage.remove(tmpHtmlPath.c_str());
|
||||||
cssParser->clear();
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Hyphenator::setPreferredLanguage(epub->getLanguage());
|
||||||
|
build_ = std::move(ctx);
|
||||||
|
|
||||||
|
if (!build_->parser->beginParse()) {
|
||||||
|
LOG_ERR("SCT", "Failed to begin parse");
|
||||||
|
abandonBuild();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
build_->totalBytes = build_->parser->parseTotalBytes();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Section::buildSomeMore(const int maxPages) {
|
||||||
|
if (!build_ || !build_->parser) {
|
||||||
|
LOG_ERR("SCT", "buildSomeMore with no active build");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Pace on pages laid out by THIS build, not pageCount: during a rebuild over a partial,
|
||||||
|
// pageCount stays pinned at the partial's watermark until the build passes it, which
|
||||||
|
// would otherwise turn one "small" chunk into a blocking rebuild of the whole watermark.
|
||||||
|
const int startCount = builtPageCount_;
|
||||||
|
for (;;) {
|
||||||
|
const auto status = build_->parser->parseStep();
|
||||||
|
if (status == ChapterHtmlSlimParser::ParseStatus::Error) {
|
||||||
|
LOG_ERR("SCT", "Parse error during incremental build");
|
||||||
|
abandonBuild();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (status == ChapterHtmlSlimParser::ParseStatus::Done) {
|
||||||
|
return finalizeBuild();
|
||||||
|
}
|
||||||
|
// ParseStatus::More: yield once we've laid out the requested number of pages.
|
||||||
|
if (maxPages > 0 && (builtPageCount_ - startCount) >= maxPages) {
|
||||||
|
build_->bytesConsumed = build_->parser->parseBytesConsumed();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Section::hasHtmlCache() const {
|
||||||
|
const std::string htmlPath = epub->getCachePath() + "/html/" + std::to_string(spineIndex) + ".html";
|
||||||
|
return Storage.exists(htmlPath.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<uint16_t> Section::findAnchorDuringBuild(const std::string& anchor) const {
|
||||||
|
if (!build_ || !build_->parser) return std::nullopt;
|
||||||
|
for (const auto& [key, page] : build_->parser->getAnchors()) {
|
||||||
|
if (key == anchor) return page;
|
||||||
|
}
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<uint16_t> Section::findAnchor(const std::string& anchor) const {
|
||||||
|
if (const auto page = findAnchorDuringBuild(anchor)) {
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
// Fall back to the on-disk anchor map: a finalized section, or a partial whose map
|
||||||
|
// covers everything up to its watermark (nullopt past it -- build further and retry).
|
||||||
|
return getPageForAnchor(anchor);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t Section::estimatedTotalPages() const {
|
||||||
|
// Extrapolation from a suspended session's watermark trailer. A static snapshot, so no EMA
|
||||||
|
// damping is needed. Also the best guess while a rebuild is running but hasn't laid out
|
||||||
|
// enough pages yet to extrapolate from its own progress.
|
||||||
|
const auto partialEstimate = [this]() -> uint16_t {
|
||||||
|
if (!partial_ || partialBytesConsumed_ == 0 || partialTotalBytes_ <= partialBytesConsumed_) {
|
||||||
|
return pageCount;
|
||||||
|
}
|
||||||
|
const uint64_t est = static_cast<uint64_t>(partialPageCount_) * partialTotalBytes_ / partialBytesConsumed_;
|
||||||
|
if (est <= pageCount) return pageCount;
|
||||||
|
return est > 60000 ? 60000 : static_cast<uint16_t>(est);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!build_) {
|
||||||
|
return partial_ ? partialEstimate() : pageCount; // partial -> extrapolate, finalized -> exact
|
||||||
|
}
|
||||||
|
const uint32_t consumed = build_->bytesConsumed;
|
||||||
|
const uint32_t total = build_->totalBytes;
|
||||||
|
if (builtPageCount_ == 0 || consumed == 0 || total <= consumed) return partialEstimate();
|
||||||
|
|
||||||
|
// Raw extrapolation: scale the pages built so far by the fraction of HTML still unparsed. This
|
||||||
|
// re-derives from a growing, non-uniform sample, so it jitters up and down as the build crosses
|
||||||
|
// dense vs sparse regions of the chapter.
|
||||||
|
const uint64_t raw = static_cast<uint64_t>(builtPageCount_) * total / consumed;
|
||||||
|
|
||||||
|
// Damp that jitter with an exponential moving average. Step it once per build advance (keyed on
|
||||||
|
// bytesConsumed) rather than per status-bar redraw, so the smoothing rate doesn't depend on how
|
||||||
|
// often we repaint. As the build nears the end, consumed -> total and raw -> the built count, so
|
||||||
|
// the average settles onto the true count (and finalizeBuild then returns the exact pageCount).
|
||||||
|
constexpr float ALPHA = 0.25f; // weight of each new sample; lower = steadier but slower to settle
|
||||||
|
if (build_->smoothedEstimate <= 0) {
|
||||||
|
build_->smoothedEstimate = static_cast<float>(raw); // seed on the first estimate
|
||||||
|
} else if (consumed != build_->smoothedAtConsumed) {
|
||||||
|
build_->smoothedEstimate += ALPHA * (static_cast<float>(raw) - build_->smoothedEstimate);
|
||||||
|
}
|
||||||
|
build_->smoothedAtConsumed = consumed;
|
||||||
|
|
||||||
|
const uint64_t est = static_cast<uint64_t>(build_->smoothedEstimate + 0.5f);
|
||||||
|
if (est <= pageCount) return pageCount; // never fewer than the pages already available
|
||||||
|
return est > 60000 ? 60000 : static_cast<uint16_t>(est);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write the LUTs and anchor map into the open tmp .bin, patch the header with the built
|
||||||
|
// page count and table offsets, stamp `version` as the commit point, then swap the tmp
|
||||||
|
// file over filePath. For SECTION_FILE_PARTIAL_VERSION a watermark trailer
|
||||||
|
// (bytesConsumed, totalBytes) is appended after the li LUT so a later open can estimate
|
||||||
|
// the total page count. The parser must still be alive (anchors are read from it).
|
||||||
|
// On failure the tmp is removed and any pre-existing file at filePath is left intact.
|
||||||
|
bool Section::commitBuildFile(const uint8_t version, const uint32_t bytesConsumed, const uint32_t totalBytes) {
|
||||||
|
const bool asPartial = (version == SECTION_FILE_PARTIAL_VERSION);
|
||||||
|
|
||||||
|
const auto failCommit = [this]() {
|
||||||
|
// Explicit close() required before remove (member variable, O_RDWR handle).
|
||||||
|
file.close();
|
||||||
|
Storage.remove(binTmpPath().c_str());
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
const uint32_t lutOffset = file.position();
|
const uint32_t lutOffset = file.position();
|
||||||
bool hasFailedLutRecords = false;
|
for (const auto& entry : build_->lut) {
|
||||||
// Write LUT
|
|
||||||
for (const auto& entry : lut) {
|
|
||||||
if (entry.fileOffset == 0) {
|
if (entry.fileOffset == 0) {
|
||||||
hasFailedLutRecords = true;
|
LOG_ERR("SCT", "Failed to write LUT due to invalid page positions");
|
||||||
break;
|
return failCommit();
|
||||||
}
|
}
|
||||||
serialization::writePod(file, entry.fileOffset);
|
serialization::writePod(file, entry.fileOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasFailedLutRecords) {
|
// Write anchor-to-page map for fragment navigation (e.g. footnote targets). For a
|
||||||
LOG_ERR("SCT", "Failed to write LUT due to invalid page positions");
|
// partial, skip anchors that landed on the incomplete trailing page the suspend drops.
|
||||||
// Explicitly close() file before calling Storage.remove()
|
|
||||||
file.close();
|
|
||||||
Storage.remove(filePath.c_str());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write anchor-to-page map for fragment navigation (e.g. footnote targets)
|
|
||||||
const uint32_t anchorMapOffset = file.position();
|
const uint32_t anchorMapOffset = file.position();
|
||||||
const auto& anchors = visitor.getAnchors();
|
const auto& anchors = build_->parser->getAnchors();
|
||||||
serialization::writePod(file, static_cast<uint16_t>(anchors.size()));
|
uint16_t anchorCount = 0;
|
||||||
for (const auto& [anchor, page] : anchors) {
|
for (const auto& [anchor, page] : anchors) {
|
||||||
|
if (!asPartial || page < builtPageCount_) anchorCount++;
|
||||||
|
}
|
||||||
|
serialization::writePod(file, anchorCount);
|
||||||
|
for (const auto& [anchor, page] : anchors) {
|
||||||
|
if (asPartial && page >= builtPageCount_) continue;
|
||||||
serialization::writeString(file, anchor);
|
serialization::writeString(file, anchor);
|
||||||
serialization::writePod(file, page);
|
serialization::writePod(file, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32_t paragraphLutOffset = file.position();
|
const uint32_t paragraphLutOffset = file.position();
|
||||||
serialization::writePod(file, static_cast<uint16_t>(lut.size()));
|
serialization::writePod(file, static_cast<uint16_t>(build_->lut.size()));
|
||||||
for (const auto& entry : lut) {
|
for (const auto& entry : build_->lut) {
|
||||||
serialization::writePod(file, entry.paragraphIndex);
|
serialization::writePod(file, entry.paragraphIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32_t liLutFileOffset = static_cast<uint32_t>(file.position());
|
const uint32_t liLutFileOffset = static_cast<uint32_t>(file.position());
|
||||||
for (const auto& entry : lut) {
|
for (const auto& entry : build_->lut) {
|
||||||
serialization::writePod(file, entry.listItemIndex);
|
serialization::writePod(file, entry.listItemIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch header with final pageCount, lutOffset, anchorMapOffset, paragraphLutOffset, and liLutOffset
|
if (asPartial) {
|
||||||
file.seek(HEADER_SIZE - sizeof(uint32_t) * 4 - sizeof(pageCount));
|
// Watermark trailer, located on load as liLutOffset + pageCount * sizeof(uint16_t).
|
||||||
serialization::writePod(file, pageCount);
|
serialization::writePod(file, bytesConsumed);
|
||||||
|
serialization::writePod(file, totalBytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch header with the built page count and section offsets...
|
||||||
|
file.seek(HEADER_SIZE - sizeof(uint32_t) * 4 - sizeof(builtPageCount_));
|
||||||
|
serialization::writePod(file, builtPageCount_);
|
||||||
serialization::writePod(file, lutOffset);
|
serialization::writePod(file, lutOffset);
|
||||||
serialization::writePod(file, anchorMapOffset);
|
serialization::writePod(file, anchorMapOffset);
|
||||||
serialization::writePod(file, paragraphLutOffset);
|
serialization::writePod(file, paragraphLutOffset);
|
||||||
serialization::writePod(file, liLutFileOffset);
|
serialization::writePod(file, liLutFileOffset);
|
||||||
|
// ...then commit by overwriting the sentinel version with the real one. Writing the
|
||||||
|
// version last makes it the commit point: a crash before here leaves version 0.
|
||||||
|
file.seek(0);
|
||||||
|
serialization::writePod(file, version);
|
||||||
// Explicit close() required: member variable persists beyond function scope
|
// Explicit close() required: member variable persists beyond function scope
|
||||||
file.close();
|
file.close();
|
||||||
if (cssParser) {
|
|
||||||
cssParser->clear();
|
// Swap into place. A crash between remove and rename loses the old file but keeps a
|
||||||
|
// fully-committed tmp; the next build just removes it and rebuilds.
|
||||||
|
if (Storage.exists(filePath.c_str())) {
|
||||||
|
Storage.remove(filePath.c_str());
|
||||||
|
}
|
||||||
|
if (!Storage.rename(binTmpPath().c_str(), filePath.c_str())) {
|
||||||
|
LOG_ERR("SCT", "Failed to move built section into place");
|
||||||
|
Storage.remove(binTmpPath().c_str());
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Page> Section::loadPageFromSectionFile() {
|
bool Section::finalizeBuild() {
|
||||||
if (!Storage.openFileForRead("SCT", filePath, file)) {
|
// Flush the trailing page (emits the last page via the completePageFn into the LUT).
|
||||||
|
build_->parser->finishParse();
|
||||||
|
|
||||||
|
if (!build_->reusedHtml) {
|
||||||
|
// Parse succeeded: promote the freshly unzipped HTML to the persistent cache so future
|
||||||
|
// rebuilds skip zip inflation. If promotion fails, drop the temp -- the build still succeeded.
|
||||||
|
if (!Storage.rename(build_->tmpHtmlPath.c_str(), build_->htmlPath.c_str())) {
|
||||||
|
LOG_DBG("SCT", "Failed to promote HTML cache, removing temp");
|
||||||
|
Storage.remove(build_->tmpHtmlPath.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const bool committed = commitBuildFile(SECTION_FILE_VERSION, 0, 0);
|
||||||
|
if (build_->cssParser) build_->cssParser->clear();
|
||||||
|
build_.reset();
|
||||||
|
if (!committed) {
|
||||||
|
// commitBuildFile removed filePath before the failed swap, so nothing valid remains.
|
||||||
|
partial_ = false;
|
||||||
|
partialPageCount_ = 0;
|
||||||
|
pageCount = 0;
|
||||||
|
builtPageCount_ = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
buildComplete_ = true;
|
||||||
|
partial_ = false;
|
||||||
|
partialPageCount_ = 0;
|
||||||
|
pageCount = builtPageCount_;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Section::suspendBuild() {
|
||||||
|
if (!build_) return;
|
||||||
|
|
||||||
|
// Only worth persisting if this build produced pages a pre-existing partial doesn't
|
||||||
|
// already cover; otherwise keep the older (bigger) partial and just drop the tmp.
|
||||||
|
const bool worthKeeping = builtPageCount_ > 0 && (!partial_ || builtPageCount_ > partialPageCount_);
|
||||||
|
|
||||||
|
bool committed = false;
|
||||||
|
if (worthKeeping) {
|
||||||
|
// Capture the parse watermark and commit before tearing the parser down (the anchor
|
||||||
|
// map is read from it). The incomplete trailing page is intentionally not flushed:
|
||||||
|
// only fully laid-out pages are persisted, and the rebuild re-derives the rest.
|
||||||
|
const uint32_t consumed = static_cast<uint32_t>(build_->parser->parseBytesConsumed());
|
||||||
|
committed = commitBuildFile(SECTION_FILE_PARTIAL_VERSION, consumed, build_->totalBytes);
|
||||||
|
if (committed) {
|
||||||
|
partial_ = true;
|
||||||
|
partialPageCount_ = builtPageCount_;
|
||||||
|
partialBytesConsumed_ = consumed;
|
||||||
|
partialTotalBytes_ = build_->totalBytes;
|
||||||
|
LOG_INF("SCT", "Suspended build: %u pages persisted", builtPageCount_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (build_->parser) build_->parser->abortParse();
|
||||||
|
if (build_->cssParser) build_->cssParser->clear();
|
||||||
|
if (!committed && file) {
|
||||||
|
// Explicit close() required before remove (member variable, O_RDWR handle).
|
||||||
|
file.close();
|
||||||
|
Storage.remove(binTmpPath().c_str());
|
||||||
|
}
|
||||||
|
if (!build_->reusedHtml && Storage.exists(build_->tmpHtmlPath.c_str())) {
|
||||||
|
Storage.remove(build_->tmpHtmlPath.c_str());
|
||||||
|
}
|
||||||
|
build_.reset();
|
||||||
|
buildComplete_ = false;
|
||||||
|
pageCount = partial_ ? partialPageCount_ : 0;
|
||||||
|
builtPageCount_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Section::abandonBuild() {
|
||||||
|
if (!build_) return;
|
||||||
|
if (build_->parser) build_->parser->abortParse();
|
||||||
|
if (build_->cssParser) build_->cssParser->clear();
|
||||||
|
if (file) {
|
||||||
|
// Explicit close() required before remove (member variable, O_RDWR handle).
|
||||||
|
file.close();
|
||||||
|
Storage.remove(binTmpPath().c_str());
|
||||||
|
}
|
||||||
|
// A parse error would recur against the same HTML, so drop any partial too -- resuming
|
||||||
|
// from it would just re-enter the failing build every open.
|
||||||
|
if (Storage.exists(filePath.c_str())) {
|
||||||
|
Storage.remove(filePath.c_str());
|
||||||
|
}
|
||||||
|
if (!build_->reusedHtml && Storage.exists(build_->tmpHtmlPath.c_str())) {
|
||||||
|
Storage.remove(build_->tmpHtmlPath.c_str());
|
||||||
|
}
|
||||||
|
build_.reset();
|
||||||
|
buildComplete_ = false;
|
||||||
|
partial_ = false;
|
||||||
|
partialPageCount_ = 0;
|
||||||
|
pageCount = 0;
|
||||||
|
builtPageCount_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<Page> Section::loadPageDuringBuild(const int page) {
|
||||||
|
if (!build_ || page < 0 || page >= static_cast<int>(build_->lut.size()) || !file) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
const uint32_t pos = build_->lut[page].fileOffset;
|
||||||
|
if (pos == 0) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
// The .bin is open O_RDWR for the build. Read the already-written page, then restore
|
||||||
|
// the write cursor so the next onPageComplete keeps appending where it left off.
|
||||||
|
const uint32_t writePos = file.position();
|
||||||
|
file.seek(pos);
|
||||||
|
auto p = Page::deserialize(file);
|
||||||
|
file.seek(writePos);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read a page from the committed file at filePath (finalized section or partial from a
|
||||||
|
// previous session). Uses a local handle so it is safe while a build holds the member
|
||||||
|
// `file` open on the tmp .bin.
|
||||||
|
std::unique_ptr<Page> Section::loadPageAt(const int page) const {
|
||||||
|
HalFile f;
|
||||||
|
if (!Storage.openFileForRead("SCT", filePath, f)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
file.seek(HEADER_SIZE - sizeof(uint32_t) * 4);
|
f.seek(HEADER_SIZE - sizeof(uint32_t) * 4);
|
||||||
uint32_t lutOffset;
|
uint32_t lutOffset;
|
||||||
serialization::readPod(file, lutOffset);
|
serialization::readPod(f, lutOffset);
|
||||||
file.seek(lutOffset + sizeof(uint32_t) * currentPage);
|
f.seek(lutOffset + sizeof(uint32_t) * page);
|
||||||
uint32_t pagePos;
|
uint32_t pagePos;
|
||||||
serialization::readPod(file, pagePos);
|
serialization::readPod(f, pagePos);
|
||||||
file.seek(pagePos);
|
f.seek(pagePos);
|
||||||
|
|
||||||
auto page = Page::deserialize(file);
|
return Page::deserialize(f);
|
||||||
// Explicit close() required: member variable persists beyond function scope
|
// No f.close() needed -- DESTRUCTOR_CLOSES_FILE=1 handles it at scope exit
|
||||||
file.close();
|
}
|
||||||
return page;
|
|
||||||
|
std::unique_ptr<Page> Section::loadPage(const int page) {
|
||||||
|
if (page < 0) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
if (build_ && page < static_cast<int>(build_->lut.size())) {
|
||||||
|
return loadPageDuringBuild(page);
|
||||||
|
}
|
||||||
|
// Not (yet) in the active build: serve from the file on disk -- a finalized section,
|
||||||
|
// or a partial from a previous session whose pages the rebuild hasn't reached again.
|
||||||
|
const int onDisk = partial_ ? partialPageCount_ : (build_ ? 0 : pageCount);
|
||||||
|
if (page >= onDisk) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return loadPageAt(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Section::getTextFromSectionFile() {
|
std::string Section::getTextFromSectionFile() {
|
||||||
std::string fullText;
|
std::string fullText;
|
||||||
auto p = this->loadPageFromSectionFile();
|
auto p = loadPage(currentPage);
|
||||||
if (p) {
|
if (p) {
|
||||||
for (const auto& el : p->elements) {
|
for (const auto& el : p->elements) {
|
||||||
if (el->getTag() == TAG_PageLine) {
|
if (el->getTag() == TAG_PageLine) {
|
||||||
@@ -361,6 +756,15 @@ std::optional<uint16_t> Section::getCachedPageCount() const {
|
|||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only a finalized section's count is the chapter total; a partial's count is just the
|
||||||
|
// suspended build's watermark, which would skew progress mapping. Callers fall back to
|
||||||
|
// their own estimates.
|
||||||
|
uint8_t version;
|
||||||
|
serialization::readPod(f, version);
|
||||||
|
if (version != SECTION_FILE_VERSION) {
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
f.seek(HEADER_SIZE - sizeof(uint32_t) * 4 - sizeof(uint16_t));
|
f.seek(HEADER_SIZE - sizeof(uint32_t) * 4 - sizeof(uint16_t));
|
||||||
uint16_t count;
|
uint16_t count;
|
||||||
serialization::readPod(f, count);
|
serialization::readPod(f, count);
|
||||||
|
|||||||
+105
-7
@@ -3,11 +3,14 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "Epub.h"
|
#include "Epub.h"
|
||||||
|
|
||||||
class Page;
|
class Page;
|
||||||
class GfxRenderer;
|
class GfxRenderer;
|
||||||
|
class ChapterHtmlSlimParser;
|
||||||
|
class CssParser;
|
||||||
|
|
||||||
class Section {
|
class Section {
|
||||||
std::shared_ptr<Epub> epub;
|
std::shared_ptr<Epub> epub;
|
||||||
@@ -21,16 +24,67 @@ class Section {
|
|||||||
bool embeddedStyle, uint8_t imageRendering, bool focusReadingEnabled);
|
bool embeddedStyle, uint8_t imageRendering, bool focusReadingEnabled);
|
||||||
uint32_t onPageComplete(std::unique_ptr<Page> page);
|
uint32_t onPageComplete(std::unique_ptr<Page> page);
|
||||||
|
|
||||||
|
// Page-offset table entry, kept in RAM while an incremental build is running so
|
||||||
|
// already-built pages can be located in the partially-written .bin.
|
||||||
|
struct PageLutEntry {
|
||||||
|
uint32_t fileOffset;
|
||||||
|
uint16_t paragraphIndex;
|
||||||
|
uint16_t listItemIndex;
|
||||||
|
};
|
||||||
|
// Held only while an incremental build is in progress (see startBuild). Carries the
|
||||||
|
// live parser plus the strings it references (the parser stores them by reference)
|
||||||
|
// and the in-RAM page-offset table.
|
||||||
|
struct BuildContext {
|
||||||
|
std::unique_ptr<ChapterHtmlSlimParser> parser;
|
||||||
|
std::vector<PageLutEntry> lut;
|
||||||
|
std::string parsePath;
|
||||||
|
std::string contentBase;
|
||||||
|
std::string imageBasePath;
|
||||||
|
std::string htmlPath;
|
||||||
|
std::string tmpHtmlPath;
|
||||||
|
bool reusedHtml = false;
|
||||||
|
CssParser* cssParser = nullptr;
|
||||||
|
// HTML byte progress, for estimating the section's total page count while it's still building.
|
||||||
|
uint32_t bytesConsumed = 0;
|
||||||
|
uint32_t totalBytes = 0;
|
||||||
|
// Exponentially-smoothed page-count estimate (0 = not yet seeded) and the bytesConsumed at its
|
||||||
|
// last update. The raw byte-ratio estimate jitters as the build crosses dense/sparse regions;
|
||||||
|
// the EMA is stepped once per build advance (not per redraw) to damp that wobble.
|
||||||
|
float smoothedEstimate = 0;
|
||||||
|
uint32_t smoothedAtConsumed = 0;
|
||||||
|
};
|
||||||
|
std::unique_ptr<BuildContext> build_;
|
||||||
|
bool buildComplete_ = false;
|
||||||
|
// Pages laid out by the active build (== build_->lut.size()). Distinct from pageCount,
|
||||||
|
// which is the pages *available to read* and also counts a loaded partial file's pages.
|
||||||
|
uint16_t builtPageCount_ = 0;
|
||||||
|
// A partial section file (suspended build from a previous session) is loaded at filePath.
|
||||||
|
// Its pages 0..partialPageCount_-1 are readable while a rebuild extends past them.
|
||||||
|
bool partial_ = false;
|
||||||
|
uint16_t partialPageCount_ = 0;
|
||||||
|
// Parse watermark from the partial's trailer, for estimating the total page count.
|
||||||
|
uint32_t partialBytesConsumed_ = 0;
|
||||||
|
uint32_t partialTotalBytes_ = 0;
|
||||||
|
bool finalizeBuild();
|
||||||
|
// Write the LUTs/anchor map (and, for a partial, the watermark trailer), patch the
|
||||||
|
// header, stamp the version byte, and swap the tmp .bin over filePath.
|
||||||
|
bool commitBuildFile(uint8_t version, uint32_t bytesConsumed, uint32_t totalBytes);
|
||||||
|
// Builds write here and are swapped over filePath only on commit, so a prior
|
||||||
|
// partial/finalized file stays readable while a rebuild is in progress.
|
||||||
|
std::string binTmpPath() const { return filePath + ".part"; }
|
||||||
|
std::unique_ptr<Page> loadPageAt(int page) const;
|
||||||
|
// Read a page already laid out by the in-progress build (page < build LUT size), from
|
||||||
|
// the partially-written tmp .bin without disturbing the build's write cursor.
|
||||||
|
std::unique_ptr<Page> loadPageDuringBuild(int page);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
uint16_t pageCount = 0;
|
uint16_t pageCount = 0;
|
||||||
int currentPage = 0;
|
int currentPage = 0;
|
||||||
|
|
||||||
explicit Section(const std::shared_ptr<Epub>& epub, const int spineIndex, GfxRenderer& renderer)
|
// Constructor and destructor are out-of-line: BuildContext holds a unique_ptr to the
|
||||||
: epub(epub),
|
// forward-declared ChapterHtmlSlimParser, whose full definition is only visible in the .cpp.
|
||||||
spineIndex(spineIndex),
|
explicit Section(const std::shared_ptr<Epub>& epub, int spineIndex, GfxRenderer& renderer);
|
||||||
renderer(renderer),
|
~Section();
|
||||||
filePath(epub->getCachePath() + "/sections/" + std::to_string(spineIndex) + ".bin") {}
|
|
||||||
~Section() = default;
|
|
||||||
bool loadSectionFile(int fontId, float lineCompression, bool extraParagraphSpacing, uint8_t paragraphAlignment,
|
bool loadSectionFile(int fontId, float lineCompression, bool extraParagraphSpacing, uint8_t paragraphAlignment,
|
||||||
uint16_t viewportWidth, uint16_t viewportHeight, bool hyphenationEnabled, bool embeddedStyle,
|
uint16_t viewportWidth, uint16_t viewportHeight, bool hyphenationEnabled, bool embeddedStyle,
|
||||||
uint8_t imageRendering, bool focusReadingEnabled);
|
uint8_t imageRendering, bool focusReadingEnabled);
|
||||||
@@ -39,12 +93,56 @@ class Section {
|
|||||||
uint16_t viewportWidth, uint16_t viewportHeight, bool hyphenationEnabled, bool embeddedStyle,
|
uint16_t viewportWidth, uint16_t viewportHeight, bool hyphenationEnabled, bool embeddedStyle,
|
||||||
uint8_t imageRendering, bool focusReadingEnabled,
|
uint8_t imageRendering, bool focusReadingEnabled,
|
||||||
const std::function<void()>& popupFn = nullptr);
|
const std::function<void()>& popupFn = nullptr);
|
||||||
std::unique_ptr<Page> loadPageFromSectionFile();
|
|
||||||
|
// Incremental build: lay out the section a few pages at a time so a large chapter
|
||||||
|
// can show its first page immediately and keep the UI responsive while the rest
|
||||||
|
// builds. createSectionFile() above is the one-shot wrapper over these.
|
||||||
|
// if (!startBuild(...)) fail;
|
||||||
|
// each tick: buildSomeMore(N); render up to pageCount; when isBuildComplete() stop.
|
||||||
|
bool startBuild(int fontId, float lineCompression, bool extraParagraphSpacing, uint8_t paragraphAlignment,
|
||||||
|
uint16_t viewportWidth, uint16_t viewportHeight, bool hyphenationEnabled, bool embeddedStyle,
|
||||||
|
uint8_t imageRendering, bool focusReadingEnabled, const std::function<void()>& popupFn = nullptr);
|
||||||
|
// Lay out up to maxPages more pages (maxPages <= 0 = build to completion). Returns
|
||||||
|
// false on error (the build is abandoned). Sets isBuildComplete() when finished.
|
||||||
|
bool buildSomeMore(int maxPages);
|
||||||
|
bool isBuilding() const { return static_cast<bool>(build_); }
|
||||||
|
bool isBuildComplete() const { return buildComplete_; }
|
||||||
|
// Best-known total page count: the exact pageCount once finalized, or a smoothed byte-based
|
||||||
|
// estimate (pages so far scaled by totalBytes/bytesConsumed, damped by an EMA) while a giant spine
|
||||||
|
// is still building, so "page X of Y" / progress don't read off the small build watermark.
|
||||||
|
uint16_t estimatedTotalPages() const;
|
||||||
|
void abandonBuild();
|
||||||
|
// Persist an in-progress build as a partial section file (version sentinel + LUTs +
|
||||||
|
// watermark trailer) instead of discarding it, so the next open of this spine can show
|
||||||
|
// its pages instantly and only rebuild in the background. Called by the destructor, so
|
||||||
|
// any teardown path (exit, sleep, navigation) keeps the work already done. Keeps a
|
||||||
|
// pre-existing partial when it covers more pages than this build reached.
|
||||||
|
void suspendBuild();
|
||||||
|
// True when a partial file was loaded: pageCount is a watermark, not the chapter total.
|
||||||
|
bool isPartial() const { return partial_; }
|
||||||
|
|
||||||
|
// Unified page read: from the active build if it has reached the page, otherwise from
|
||||||
|
// the on-disk file (finalized section, or a partial the rebuild hasn't caught up to).
|
||||||
|
std::unique_ptr<Page> loadPage(int page);
|
||||||
|
|
||||||
std::string getTextFromSectionFile();
|
std::string getTextFromSectionFile();
|
||||||
|
|
||||||
|
// Resolve an anchor from the in-progress build first, then the on-disk anchor map
|
||||||
|
// (covers finalized sections and partials from a previous session).
|
||||||
|
std::optional<uint16_t> findAnchor(const std::string& anchor) const;
|
||||||
|
|
||||||
|
// True if this spine's unzipped HTML is already cached, so a build won't pay the (multi-second on a
|
||||||
|
// giant spine) zip inflation. Lets the reader skip the indexing popup on a fast reopen/rebuild.
|
||||||
|
bool hasHtmlCache() const;
|
||||||
|
|
||||||
// Look up the page number for an anchor id from the section cache file.
|
// Look up the page number for an anchor id from the section cache file.
|
||||||
std::optional<uint16_t> getPageForAnchor(const std::string& anchor) const;
|
std::optional<uint16_t> getPageForAnchor(const std::string& anchor) const;
|
||||||
|
|
||||||
|
// Look up an anchor among the pages built so far by the in-progress build, so an anchor jump
|
||||||
|
// (TOC / chapter select, usually the chapter top = page 0) can resolve without laying out the
|
||||||
|
// whole chapter. Returns nullopt if the anchor hasn't been reached yet (build more) or no build.
|
||||||
|
std::optional<uint16_t> findAnchorDuringBuild(const std::string& anchor) const;
|
||||||
|
|
||||||
// Get the page count from the section cache file without fully loading it.
|
// Get the page count from the section cache file without fully loading it.
|
||||||
std::optional<uint16_t> getCachedPageCount() const;
|
std::optional<uint16_t> getCachedPageCount() const;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,39 @@ void TextBlock::render(const GfxRenderer& renderer, const int fontId, const int
|
|||||||
|
|
||||||
const bool scanning = renderer.isFontCacheScanning();
|
const bool scanning = renderer.isFontCacheScanning();
|
||||||
const int ascender = renderer.getFontAscenderSize(fontId);
|
const int ascender = renderer.getFontAscenderSize(fontId);
|
||||||
|
|
||||||
|
struct DecorationLineTracker {
|
||||||
|
EpdFontFamily::Style style;
|
||||||
|
int yOffset;
|
||||||
|
int startX = -1;
|
||||||
|
int endX = -1;
|
||||||
|
int yPos = 0;
|
||||||
|
|
||||||
|
bool active() const { return startX != -1; }
|
||||||
|
void reset() {
|
||||||
|
startX = -1;
|
||||||
|
endX = -1;
|
||||||
|
yPos = 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
DecorationLineTracker decorationLines[] = {
|
||||||
|
{EpdFontFamily::UNDERLINE, ascender + 2},
|
||||||
|
{EpdFontFamily::STRIKETHROUGH, ascender * 4 / 5},
|
||||||
|
};
|
||||||
|
|
||||||
|
const auto flushDecoration = [&](DecorationLineTracker& line) {
|
||||||
|
if (line.active()) {
|
||||||
|
renderer.drawLine(line.startX, line.yPos, line.endX, line.yPos, 2, true);
|
||||||
|
line.reset();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const auto flushDecorations = [&]() {
|
||||||
|
for (auto& line : decorationLines) {
|
||||||
|
flushDecoration(line);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
for (size_t i = 0; i < words.size(); i++) {
|
for (size_t i = 0; i < words.size(); i++) {
|
||||||
const int wordX = wordXpos[i] + x;
|
const int wordX = wordXpos[i] + x;
|
||||||
const EpdFontFamily::Style currentStyle = wordStyles[i];
|
const EpdFontFamily::Style currentStyle = wordStyles[i];
|
||||||
@@ -59,18 +92,51 @@ void TextBlock::render(const GfxRenderer& renderer, const int fontId, const int
|
|||||||
renderer.drawText(fontId, wordX, wordY, words[i].c_str(), true, currentStyle, baseDir);
|
renderer.drawText(fontId, wordX, wordY, words[i].c_str(), true, currentStyle, baseDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!scanning && (currentStyle & EpdFontFamily::UNDERLINE) != 0) {
|
if (scanning) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EpdFontFamily::hasTextDecoration(currentStyle)) {
|
||||||
const std::string& w = words[i];
|
const std::string& w = words[i];
|
||||||
int underlineWidth = renderer.getTextWidth(fontId, w.c_str(), currentStyle, baseDir);
|
int lineStartX = wordX;
|
||||||
const int underlineY = wordY + ascender + 2;
|
int lineWidth = renderer.getTextWidth(fontId, w.c_str(), currentStyle, baseDir);
|
||||||
|
|
||||||
if ((currentStyle & (EpdFontFamily::SUP | EpdFontFamily::SUB)) != 0) {
|
if ((currentStyle & (EpdFontFamily::SUP | EpdFontFamily::SUB)) != 0) {
|
||||||
underlineWidth = (underlineWidth + 1) / 2;
|
lineWidth = (lineWidth + 1) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer.drawLine(wordX, underlineY, wordX + underlineWidth, underlineY, true);
|
// Do not decorate the synthetic em-space used for paragraph indentation.
|
||||||
|
if (w.size() >= 3 && static_cast<uint8_t>(w[0]) == 0xE2 && static_cast<uint8_t>(w[1]) == 0x80 &&
|
||||||
|
static_cast<uint8_t>(w[2]) == 0x83) {
|
||||||
|
const char* visibleText = w.c_str() + 3;
|
||||||
|
lineStartX += renderer.getTextAdvanceX(fontId, "\xe2\x80\x83", currentStyle);
|
||||||
|
lineWidth = renderer.getTextWidth(fontId, visibleText, currentStyle, baseDir);
|
||||||
|
if ((currentStyle & (EpdFontFamily::SUP | EpdFontFamily::SUB)) != 0) {
|
||||||
|
lineWidth = (lineWidth + 1) / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& line : decorationLines) {
|
||||||
|
if ((currentStyle & line.style) == 0) {
|
||||||
|
flushDecoration(line);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const int lineY = wordY + line.yOffset;
|
||||||
|
if (line.active() && line.yPos != lineY) {
|
||||||
|
flushDecoration(line);
|
||||||
|
}
|
||||||
|
if (!line.active()) {
|
||||||
|
line.startX = lineStartX;
|
||||||
|
line.yPos = lineY;
|
||||||
|
}
|
||||||
|
line.endX = lineStartX + lineWidth;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
flushDecorations();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
flushDecorations();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TextBlock::serialize(HalFile& file) const {
|
bool TextBlock::serialize(HalFile& file) const {
|
||||||
|
|||||||
@@ -67,13 +67,6 @@ constexpr bool iequalsAscii(std::string_view value, std::string_view lowercaseKe
|
|||||||
[](char a, char b) { return asciiToLower(a) == b; });
|
[](char a, char b) { return asciiToLower(a) == b; });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Case-insensitive ASCII substring search. Only needed by text-decoration,
|
|
||||||
// which accepts multi-value strings like "underline solid red".
|
|
||||||
constexpr bool icontainsAscii(std::string_view value, std::string_view lowercaseKeyword) {
|
|
||||||
return std::search(value.begin(), value.end(), lowercaseKeyword.begin(), lowercaseKeyword.end(),
|
|
||||||
[](char a, char b) { return asciiToLower(a) == b; }) != value.end();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Walk s and invoke fn(token) for each non-empty run between delimiters.
|
// Walk s and invoke fn(token) for each non-empty run between delimiters.
|
||||||
// Tokens are boundary-trimmed and yielded as string_views into s; no
|
// Tokens are boundary-trimmed and yielded as string_views into s; no
|
||||||
// allocation. Runs of consecutive delimiters coalesce — no empty tokens are
|
// allocation. Runs of consecutive delimiters coalesce — no empty tokens are
|
||||||
@@ -252,11 +245,20 @@ CssFontWeight CssParser::interpretFontWeight(std::string_view val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CssTextDecoration CssParser::interpretDecoration(std::string_view val) {
|
CssTextDecoration CssParser::interpretDecoration(std::string_view val) {
|
||||||
// text-decoration can have multiple space-separated values
|
// text-decoration can have multiple space-separated values. Compare whole tokens
|
||||||
if (icontainsAscii(val, "underline")) {
|
// so malformed values like "notunderline" do not accidentally enable a line.
|
||||||
return CssTextDecoration::Underline;
|
CssTextDecoration result = CssTextDecoration::None;
|
||||||
}
|
bool explicitNone = false;
|
||||||
return CssTextDecoration::None;
|
forEachDelimitedToken(val, isCssWhitespace, [&](const std::string_view token) {
|
||||||
|
if (iequalsAscii(token, "none")) {
|
||||||
|
explicitNone = true;
|
||||||
|
} else if (iequalsAscii(token, "underline")) {
|
||||||
|
result = result | CssTextDecoration::Underline;
|
||||||
|
} else if (iequalsAscii(token, "line-through")) {
|
||||||
|
result = result | CssTextDecoration::LineThrough;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return explicitNone ? CssTextDecoration::None : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
CssLength CssParser::interpretLength(std::string_view val) {
|
CssLength CssParser::interpretLength(std::string_view val) {
|
||||||
@@ -868,7 +870,7 @@ bool CssParser::loadFromCache() {
|
|||||||
rulesBySelector_.clear();
|
rulesBySelector_.clear();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
style.textDecoration = static_cast<CssTextDecoration>(enumVal);
|
style.textDecoration = static_cast<CssTextDecoration>(enumVal & CSS_TEXT_DECORATION_MASK);
|
||||||
|
|
||||||
if (file.read(&enumVal, 1) != 1) {
|
if (file.read(&enumVal, 1) != 1) {
|
||||||
rulesBySelector_.clear();
|
rulesBySelector_.clear();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
class CssParser {
|
class CssParser {
|
||||||
public:
|
public:
|
||||||
// Bump when CSS cache format or rules change; section caches are invalidated when this changes
|
// Bump when CSS cache format or rules change; section caches are invalidated when this changes
|
||||||
static constexpr uint8_t CSS_CACHE_VERSION = 6;
|
static constexpr uint8_t CSS_CACHE_VERSION = 7;
|
||||||
|
|
||||||
explicit CssParser(std::string cachePath) : cachePath(std::move(cachePath)) {}
|
explicit CssParser(std::string cachePath) : cachePath(std::move(cachePath)) {}
|
||||||
~CssParser() = default;
|
~CssParser() = default;
|
||||||
|
|||||||
@@ -52,8 +52,19 @@ enum class CssFontStyle : uint8_t { Normal = 0, Italic = 1 };
|
|||||||
// Font weight options - CSS supports 100-900, we simplify to normal/bold
|
// Font weight options - CSS supports 100-900, we simplify to normal/bold
|
||||||
enum class CssFontWeight : uint8_t { Normal = 0, Bold = 1 };
|
enum class CssFontWeight : uint8_t { Normal = 0, Bold = 1 };
|
||||||
|
|
||||||
// Text decoration options
|
// Text decoration options. Values are bit flags so CSS can combine multiple line decorations.
|
||||||
enum class CssTextDecoration : uint8_t { None = 0, Underline = 1 };
|
enum class CssTextDecoration : uint8_t { None = 0, Underline = 1, LineThrough = 2 };
|
||||||
|
|
||||||
|
constexpr CssTextDecoration operator|(const CssTextDecoration a, const CssTextDecoration b) {
|
||||||
|
return static_cast<CssTextDecoration>(static_cast<uint8_t>(a) | static_cast<uint8_t>(b));
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr CssTextDecoration operator&(const CssTextDecoration a, const CssTextDecoration b) {
|
||||||
|
return static_cast<CssTextDecoration>(static_cast<uint8_t>(a) & static_cast<uint8_t>(b));
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr uint8_t CSS_TEXT_DECORATION_MASK =
|
||||||
|
static_cast<uint8_t>(CssTextDecoration::Underline) | static_cast<uint8_t>(CssTextDecoration::LineThrough);
|
||||||
|
|
||||||
// Display options - only None and Block are relevant for e-ink rendering
|
// Display options - only None and Block are relevant for e-ink rendering
|
||||||
enum class CssDisplay : uint8_t { Block = 0, None = 1 };
|
enum class CssDisplay : uint8_t { Block = 0, None = 1 };
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ constexpr const char* BLOCK_TAGS[] = {"p", "li", "div", "br", "blockquote"};
|
|||||||
constexpr const char* BOLD_TAGS[] = {"b", "strong"};
|
constexpr const char* BOLD_TAGS[] = {"b", "strong"};
|
||||||
constexpr const char* ITALIC_TAGS[] = {"i", "em"};
|
constexpr const char* ITALIC_TAGS[] = {"i", "em"};
|
||||||
constexpr const char* UNDERLINE_TAGS[] = {"u", "ins"};
|
constexpr const char* UNDERLINE_TAGS[] = {"u", "ins"};
|
||||||
|
constexpr const char* LINETHROUGH_TAGS[] = {"del", "s", "strike"};
|
||||||
constexpr const char* IMAGE_TAGS[] = {"img"};
|
constexpr const char* IMAGE_TAGS[] = {"img"};
|
||||||
constexpr const char* SKIP_TAGS[] = {"head"};
|
constexpr const char* SKIP_TAGS[] = {"head"};
|
||||||
|
|
||||||
@@ -89,13 +90,50 @@ void ChapterHtmlSlimParser::applyDirectionToEntry(StyleStackEntry& entry, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update effective bold/italic/underline based on block style and inline style stack
|
EpdFontFamily::Style ChapterHtmlSlimParser::fontStyleForTextDecoration(const CssTextDecoration decoration) {
|
||||||
|
EpdFontFamily::Style style = EpdFontFamily::REGULAR;
|
||||||
|
if ((decoration & CssTextDecoration::Underline) != CssTextDecoration::None) {
|
||||||
|
style = static_cast<EpdFontFamily::Style>(style | EpdFontFamily::UNDERLINE);
|
||||||
|
}
|
||||||
|
if ((decoration & CssTextDecoration::LineThrough) != CssTextDecoration::None) {
|
||||||
|
style = static_cast<EpdFontFamily::Style>(style | EpdFontFamily::STRIKETHROUGH);
|
||||||
|
}
|
||||||
|
return style;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChapterHtmlSlimParser::applyTextDecorationToEntry(StyleStackEntry& entry, const CssStyle& css) {
|
||||||
|
if (css.hasTextDecoration()) {
|
||||||
|
entry.hasTextDecoration = true;
|
||||||
|
entry.textDecoration = css.textDecoration;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChapterHtmlSlimParser::pushDecorationStyleEntry(const CssTextDecoration defaultDecoration,
|
||||||
|
const CssStyle& cssStyle) {
|
||||||
|
StyleStackEntry entry;
|
||||||
|
entry.depth = depth;
|
||||||
|
entry.hasTextDecoration = true;
|
||||||
|
entry.textDecoration = cssStyle.hasTextDecoration() ? cssStyle.textDecoration : defaultDecoration;
|
||||||
|
if (cssStyle.hasFontWeight()) {
|
||||||
|
entry.hasBold = true;
|
||||||
|
entry.bold = cssStyle.fontWeight == CssFontWeight::Bold;
|
||||||
|
}
|
||||||
|
if (cssStyle.hasFontStyle()) {
|
||||||
|
entry.hasItalic = true;
|
||||||
|
entry.italic = cssStyle.fontStyle == CssFontStyle::Italic;
|
||||||
|
}
|
||||||
|
applyDirectionToEntry(entry, cssStyle);
|
||||||
|
inlineStyleStack.push_back(entry);
|
||||||
|
updateEffectiveInlineStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update effective bold/italic/decorations based on block style and inline style stack
|
||||||
void ChapterHtmlSlimParser::updateEffectiveInlineStyle() {
|
void ChapterHtmlSlimParser::updateEffectiveInlineStyle() {
|
||||||
// Start with block-level styles
|
// Start with block-level styles
|
||||||
effectiveBold = currentCssStyle.hasFontWeight() && currentCssStyle.fontWeight == CssFontWeight::Bold;
|
effectiveBold = currentCssStyle.hasFontWeight() && currentCssStyle.fontWeight == CssFontWeight::Bold;
|
||||||
effectiveItalic = currentCssStyle.hasFontStyle() && currentCssStyle.fontStyle == CssFontStyle::Italic;
|
effectiveItalic = currentCssStyle.hasFontStyle() && currentCssStyle.fontStyle == CssFontStyle::Italic;
|
||||||
effectiveUnderline =
|
effectiveTextDecoration =
|
||||||
currentCssStyle.hasTextDecoration() && currentCssStyle.textDecoration == CssTextDecoration::Underline;
|
currentCssStyle.hasTextDecoration() ? currentCssStyle.textDecoration : CssTextDecoration::None;
|
||||||
effectiveDirectionDefined = currentCssStyle.hasDirection();
|
effectiveDirectionDefined = currentCssStyle.hasDirection();
|
||||||
effectiveDirection = currentCssStyle.direction;
|
effectiveDirection = currentCssStyle.direction;
|
||||||
effectiveSup = false;
|
effectiveSup = false;
|
||||||
@@ -109,8 +147,10 @@ void ChapterHtmlSlimParser::updateEffectiveInlineStyle() {
|
|||||||
if (entry.hasItalic) {
|
if (entry.hasItalic) {
|
||||||
effectiveItalic = entry.italic;
|
effectiveItalic = entry.italic;
|
||||||
}
|
}
|
||||||
if (entry.hasUnderline) {
|
// CSS line decorations propagate through descendants; child entries add
|
||||||
effectiveUnderline = entry.underline;
|
// their own lines but cannot cancel an ancestor's already active line.
|
||||||
|
if (entry.hasTextDecoration) {
|
||||||
|
effectiveTextDecoration = effectiveTextDecoration | entry.textDecoration;
|
||||||
}
|
}
|
||||||
if (entry.hasDirection) {
|
if (entry.hasDirection) {
|
||||||
effectiveDirectionDefined = true;
|
effectiveDirectionDefined = true;
|
||||||
@@ -164,7 +204,6 @@ void ChapterHtmlSlimParser::flushPartWordBuffer() {
|
|||||||
// Determine font style from depth-based tracking and CSS effective style
|
// Determine font style from depth-based tracking and CSS effective style
|
||||||
const bool isBold = boldUntilDepth < depth || effectiveBold;
|
const bool isBold = boldUntilDepth < depth || effectiveBold;
|
||||||
const bool isItalic = italicUntilDepth < depth || effectiveItalic;
|
const bool isItalic = italicUntilDepth < depth || effectiveItalic;
|
||||||
const bool isUnderline = underlineUntilDepth < depth || effectiveUnderline;
|
|
||||||
|
|
||||||
// Combine style flags using bitwise OR
|
// Combine style flags using bitwise OR
|
||||||
EpdFontFamily::Style fontStyle = EpdFontFamily::REGULAR;
|
EpdFontFamily::Style fontStyle = EpdFontFamily::REGULAR;
|
||||||
@@ -174,9 +213,7 @@ void ChapterHtmlSlimParser::flushPartWordBuffer() {
|
|||||||
if (isItalic) {
|
if (isItalic) {
|
||||||
fontStyle = static_cast<EpdFontFamily::Style>(fontStyle | EpdFontFamily::ITALIC);
|
fontStyle = static_cast<EpdFontFamily::Style>(fontStyle | EpdFontFamily::ITALIC);
|
||||||
}
|
}
|
||||||
if (isUnderline) {
|
fontStyle = static_cast<EpdFontFamily::Style>(fontStyle | fontStyleForTextDecoration(effectiveTextDecoration));
|
||||||
fontStyle = static_cast<EpdFontFamily::Style>(fontStyle | EpdFontFamily::UNDERLINE);
|
|
||||||
}
|
|
||||||
if (effectiveSup) {
|
if (effectiveSup) {
|
||||||
fontStyle = static_cast<EpdFontFamily::Style>(fontStyle | EpdFontFamily::SUP);
|
fontStyle = static_cast<EpdFontFamily::Style>(fontStyle | EpdFontFamily::SUP);
|
||||||
} else if (effectiveSub) {
|
} else if (effectiveSub) {
|
||||||
@@ -317,6 +354,14 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
|||||||
const bool isTocAnchor =
|
const bool isTocAnchor =
|
||||||
std::find(self->tocAnchors.begin(), self->tocAnchors.end(), idValue) != self->tocAnchors.end();
|
std::find(self->tocAnchors.begin(), self->tocAnchors.end(), idValue) != self->tocAnchors.end();
|
||||||
if (isTocAnchor || (!isNonNavigableInlineElement(name) && self->anchorData.size() < MAX_ANCHORS_PER_CHAPTER)) {
|
if (isTocAnchor || (!isNonNavigableInlineElement(name) && self->anchorData.size() < MAX_ANCHORS_PER_CHAPTER)) {
|
||||||
|
// Flush a displaced anchor before overwriting. Consecutive non-block elements
|
||||||
|
// (e.g. <aside id="fn1">text</aside><aside id="fn2">) with no intervening block
|
||||||
|
// never trigger startNewTextBlock, so fn1 gets silently overwritten. That leaves
|
||||||
|
// fn1 missing from the anchor map -> getPageForAnchor returns nullopt -> reader
|
||||||
|
// lands at page 0 (section start) instead of the footnote.
|
||||||
|
if (!self->pendingAnchorId.empty()) {
|
||||||
|
self->flushPendingAnchor();
|
||||||
|
}
|
||||||
self->pendingAnchorId = idValue;
|
self->pendingAnchorId = idValue;
|
||||||
}
|
}
|
||||||
} else if (strcmp(atts[i], "dir") == 0) {
|
} else if (strcmp(atts[i], "dir") == 0) {
|
||||||
@@ -412,14 +457,15 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
|||||||
headerStyle.bold = false;
|
headerStyle.bold = false;
|
||||||
headerStyle.hasItalic = true;
|
headerStyle.hasItalic = true;
|
||||||
headerStyle.italic = true;
|
headerStyle.italic = true;
|
||||||
headerStyle.hasUnderline = true;
|
|
||||||
headerStyle.underline = false;
|
|
||||||
self->inlineStyleStack.push_back(headerStyle);
|
self->inlineStyleStack.push_back(headerStyle);
|
||||||
self->updateEffectiveInlineStyle();
|
self->updateEffectiveInlineStyle();
|
||||||
|
const CssTextDecoration savedTextDecoration = self->effectiveTextDecoration;
|
||||||
|
self->effectiveTextDecoration = CssTextDecoration::None;
|
||||||
self->characterData(userData, headerText.c_str(), static_cast<int>(headerText.length()));
|
self->characterData(userData, headerText.c_str(), static_cast<int>(headerText.length()));
|
||||||
if (self->partWordBufferIndex > 0) {
|
if (self->partWordBufferIndex > 0) {
|
||||||
self->flushPartWordBuffer();
|
self->flushPartWordBuffer();
|
||||||
}
|
}
|
||||||
|
self->effectiveTextDecoration = savedTextDecoration;
|
||||||
self->nextWordContinues = false;
|
self->nextWordContinues = false;
|
||||||
self->inlineStyleStack.pop_back();
|
self->inlineStyleStack.pop_back();
|
||||||
self->updateEffectiveInlineStyle();
|
self->updateEffectiveInlineStyle();
|
||||||
@@ -752,12 +798,11 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
|||||||
self->currentFootnote.number[0] = '\0';
|
self->currentFootnote.number[0] = '\0';
|
||||||
self->currentFootnoteLinkTextLen = 0;
|
self->currentFootnoteLinkTextLen = 0;
|
||||||
|
|
||||||
// Apply underline style to visually indicate the link
|
// Apply underline style to visually indicate the link.
|
||||||
self->underlineUntilDepth = std::min(self->underlineUntilDepth, self->depth);
|
|
||||||
StyleStackEntry entry;
|
StyleStackEntry entry;
|
||||||
entry.depth = self->depth;
|
entry.depth = self->depth;
|
||||||
entry.hasUnderline = true;
|
entry.hasTextDecoration = true;
|
||||||
entry.underline = true;
|
entry.textDecoration = CssTextDecoration::Underline;
|
||||||
applyDirectionToEntry(entry, cssStyle);
|
applyDirectionToEntry(entry, cssStyle);
|
||||||
self->inlineStyleStack.push_back(entry);
|
self->inlineStyleStack.push_back(entry);
|
||||||
self->updateEffectiveInlineStyle();
|
self->updateEffectiveInlineStyle();
|
||||||
@@ -829,23 +874,14 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
|||||||
self->flushPartWordBuffer();
|
self->flushPartWordBuffer();
|
||||||
self->nextWordContinues = true;
|
self->nextWordContinues = true;
|
||||||
}
|
}
|
||||||
self->underlineUntilDepth = std::min(self->underlineUntilDepth, self->depth);
|
self->pushDecorationStyleEntry(CssTextDecoration::Underline, cssStyle);
|
||||||
// Push inline style entry for underline tag
|
} else if (matches(name, LINETHROUGH_TAGS, std::size(LINETHROUGH_TAGS))) {
|
||||||
StyleStackEntry entry;
|
// Flush buffer before style change so preceding text gets current style
|
||||||
entry.depth = self->depth; // Track depth for matching pop
|
if (self->partWordBufferIndex > 0) {
|
||||||
entry.hasUnderline = true;
|
self->flushPartWordBuffer();
|
||||||
entry.underline = true;
|
self->nextWordContinues = true;
|
||||||
if (cssStyle.hasFontWeight()) {
|
|
||||||
entry.hasBold = true;
|
|
||||||
entry.bold = cssStyle.fontWeight == CssFontWeight::Bold;
|
|
||||||
}
|
}
|
||||||
if (cssStyle.hasFontStyle()) {
|
self->pushDecorationStyleEntry(CssTextDecoration::LineThrough, cssStyle);
|
||||||
entry.hasItalic = true;
|
|
||||||
entry.italic = cssStyle.fontStyle == CssFontStyle::Italic;
|
|
||||||
}
|
|
||||||
applyDirectionToEntry(entry, cssStyle);
|
|
||||||
self->inlineStyleStack.push_back(entry);
|
|
||||||
self->updateEffectiveInlineStyle();
|
|
||||||
} else if (matches(name, BOLD_TAGS, std::size(BOLD_TAGS))) {
|
} else if (matches(name, BOLD_TAGS, std::size(BOLD_TAGS))) {
|
||||||
// Flush buffer before style change so preceding text gets current style
|
// Flush buffer before style change so preceding text gets current style
|
||||||
if (self->partWordBufferIndex > 0) {
|
if (self->partWordBufferIndex > 0) {
|
||||||
@@ -862,10 +898,7 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
|||||||
entry.hasItalic = true;
|
entry.hasItalic = true;
|
||||||
entry.italic = cssStyle.fontStyle == CssFontStyle::Italic;
|
entry.italic = cssStyle.fontStyle == CssFontStyle::Italic;
|
||||||
}
|
}
|
||||||
if (cssStyle.hasTextDecoration()) {
|
applyTextDecorationToEntry(entry, cssStyle);
|
||||||
entry.hasUnderline = true;
|
|
||||||
entry.underline = cssStyle.textDecoration == CssTextDecoration::Underline;
|
|
||||||
}
|
|
||||||
applyDirectionToEntry(entry, cssStyle);
|
applyDirectionToEntry(entry, cssStyle);
|
||||||
self->inlineStyleStack.push_back(entry);
|
self->inlineStyleStack.push_back(entry);
|
||||||
self->updateEffectiveInlineStyle();
|
self->updateEffectiveInlineStyle();
|
||||||
@@ -885,10 +918,7 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
|||||||
entry.hasBold = true;
|
entry.hasBold = true;
|
||||||
entry.bold = cssStyle.fontWeight == CssFontWeight::Bold;
|
entry.bold = cssStyle.fontWeight == CssFontWeight::Bold;
|
||||||
}
|
}
|
||||||
if (cssStyle.hasTextDecoration()) {
|
applyTextDecorationToEntry(entry, cssStyle);
|
||||||
entry.hasUnderline = true;
|
|
||||||
entry.underline = cssStyle.textDecoration == CssTextDecoration::Underline;
|
|
||||||
}
|
|
||||||
applyDirectionToEntry(entry, cssStyle);
|
applyDirectionToEntry(entry, cssStyle);
|
||||||
self->inlineStyleStack.push_back(entry);
|
self->inlineStyleStack.push_back(entry);
|
||||||
self->updateEffectiveInlineStyle();
|
self->updateEffectiveInlineStyle();
|
||||||
@@ -927,10 +957,7 @@ void XMLCALL ChapterHtmlSlimParser::startElement(void* userData, const XML_Char*
|
|||||||
entry.hasItalic = true;
|
entry.hasItalic = true;
|
||||||
entry.italic = cssStyle.fontStyle == CssFontStyle::Italic;
|
entry.italic = cssStyle.fontStyle == CssFontStyle::Italic;
|
||||||
}
|
}
|
||||||
if (cssStyle.hasTextDecoration()) {
|
applyTextDecorationToEntry(entry, cssStyle);
|
||||||
entry.hasUnderline = true;
|
|
||||||
entry.underline = cssStyle.textDecoration == CssTextDecoration::Underline;
|
|
||||||
}
|
|
||||||
applyDirectionToEntry(entry, cssStyle);
|
applyDirectionToEntry(entry, cssStyle);
|
||||||
if (cssStyle.hasVerticalAlign()) {
|
if (cssStyle.hasVerticalAlign()) {
|
||||||
if (cssStyle.verticalAlign == CssVerticalAlign::Super) {
|
if (cssStyle.verticalAlign == CssVerticalAlign::Super) {
|
||||||
@@ -1142,9 +1169,8 @@ void XMLCALL ChapterHtmlSlimParser::endElement(void* userData, const XML_Char* n
|
|||||||
!self->inlineStyleStack.empty() && self->inlineStyleStack.back().depth == self->depth - 1;
|
!self->inlineStyleStack.empty() && self->inlineStyleStack.back().depth == self->depth - 1;
|
||||||
const bool willClearBold = self->boldUntilDepth == self->depth - 1;
|
const bool willClearBold = self->boldUntilDepth == self->depth - 1;
|
||||||
const bool willClearItalic = self->italicUntilDepth == self->depth - 1;
|
const bool willClearItalic = self->italicUntilDepth == self->depth - 1;
|
||||||
const bool willClearUnderline = self->underlineUntilDepth == self->depth - 1;
|
|
||||||
|
|
||||||
const bool styleWillChange = willPopStyleStack || willClearBold || willClearItalic || willClearUnderline;
|
const bool styleWillChange = willPopStyleStack || willClearBold || willClearItalic;
|
||||||
const bool headerOrBlockTag = isHeaderOrBlock(name);
|
const bool headerOrBlockTag = isHeaderOrBlock(name);
|
||||||
const bool tableStructuralTag = isTableStructuralTag(name);
|
const bool tableStructuralTag = isTableStructuralTag(name);
|
||||||
|
|
||||||
@@ -1163,7 +1189,8 @@ void XMLCALL ChapterHtmlSlimParser::endElement(void* userData, const XML_Char* n
|
|||||||
!matches(name, IMAGE_TAGS, std::size(IMAGE_TAGS)) && self->depth != 1;
|
!matches(name, IMAGE_TAGS, std::size(IMAGE_TAGS)) && self->depth != 1;
|
||||||
const bool shouldFlush = styleWillChange || headerOrBlockTag || matches(name, BOLD_TAGS, std::size(BOLD_TAGS)) ||
|
const bool shouldFlush = styleWillChange || headerOrBlockTag || matches(name, BOLD_TAGS, std::size(BOLD_TAGS)) ||
|
||||||
matches(name, ITALIC_TAGS, std::size(ITALIC_TAGS)) ||
|
matches(name, ITALIC_TAGS, std::size(ITALIC_TAGS)) ||
|
||||||
matches(name, UNDERLINE_TAGS, std::size(UNDERLINE_TAGS)) || tableStructuralTag ||
|
matches(name, UNDERLINE_TAGS, std::size(UNDERLINE_TAGS)) ||
|
||||||
|
matches(name, LINETHROUGH_TAGS, std::size(LINETHROUGH_TAGS)) || tableStructuralTag ||
|
||||||
matches(name, IMAGE_TAGS, std::size(IMAGE_TAGS)) || self->depth == 1;
|
matches(name, IMAGE_TAGS, std::size(IMAGE_TAGS)) || self->depth == 1;
|
||||||
|
|
||||||
if (shouldFlush) {
|
if (shouldFlush) {
|
||||||
@@ -1222,11 +1249,6 @@ void XMLCALL ChapterHtmlSlimParser::endElement(void* userData, const XML_Char* n
|
|||||||
self->italicUntilDepth = INT_MAX;
|
self->italicUntilDepth = INT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Leaving underline tag
|
|
||||||
if (self->underlineUntilDepth == self->depth) {
|
|
||||||
self->underlineUntilDepth = INT_MAX;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pop from inline style stack if we pushed an entry at this depth
|
// Pop from inline style stack if we pushed an entry at this depth
|
||||||
// This handles all inline elements: b, i, u, span, etc.
|
// This handles all inline elements: b, i, u, span, etc.
|
||||||
if (!self->inlineStyleStack.empty() && self->inlineStyleStack.back().depth == self->depth) {
|
if (!self->inlineStyleStack.empty() && self->inlineStyleStack.back().depth == self->depth) {
|
||||||
@@ -1253,7 +1275,9 @@ void XMLCALL ChapterHtmlSlimParser::endElement(void* userData, const XML_Char* n
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChapterHtmlSlimParser::parseAndBuildPages() {
|
ChapterHtmlSlimParser::~ChapterHtmlSlimParser() { abortParse(); }
|
||||||
|
|
||||||
|
bool ChapterHtmlSlimParser::beginParse() {
|
||||||
// Initialize block style stack with a root entry representing "no ancestor block elements".
|
// Initialize block style stack with a root entry representing "no ancestor block elements".
|
||||||
// The user's paragraph alignment is set as the default so child elements without explicit
|
// The user's paragraph alignment is set as the default so child elements without explicit
|
||||||
// text-align inherit it correctly through getCombinedBlockStyle.
|
// text-align inherit it correctly through getCombinedBlockStyle.
|
||||||
@@ -1271,67 +1295,78 @@ bool ChapterHtmlSlimParser::parseAndBuildPages() {
|
|||||||
paragraphAlignmentBlockStyle.alignment = align;
|
paragraphAlignmentBlockStyle.alignment = align;
|
||||||
startNewTextBlock(paragraphAlignmentBlockStyle);
|
startNewTextBlock(paragraphAlignmentBlockStyle);
|
||||||
|
|
||||||
XML_Parser parser = XML_ParserCreate(nullptr);
|
xmlParser_ = XML_ParserCreate(nullptr);
|
||||||
int done;
|
if (!xmlParser_) {
|
||||||
|
|
||||||
if (!parser) {
|
|
||||||
LOG_ERR("EHP", "Couldn't allocate memory for parser");
|
LOG_ERR("EHP", "Couldn't allocate memory for parser");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle HTML entities (like ) that aren't in XML spec or DTD
|
// Handle HTML entities (like ) that aren't in XML spec or DTD
|
||||||
// Using DefaultHandlerExpand preserves normal entity expansion from DOCTYPE
|
// Using DefaultHandlerExpand preserves normal entity expansion from DOCTYPE
|
||||||
XML_SetDefaultHandlerExpand(parser, defaultHandlerExpand);
|
XML_SetDefaultHandlerExpand(xmlParser_, defaultHandlerExpand);
|
||||||
|
|
||||||
HalFile file;
|
if (!Storage.openFileForRead("EHP", filepath, parseFile_)) {
|
||||||
if (!Storage.openFileForRead("EHP", filepath, file)) {
|
destroyXmlParser(xmlParser_);
|
||||||
destroyXmlParser(parser);
|
xmlParser_ = nullptr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get file size to decide whether to show indexing popup.
|
// Get file size to decide whether to show indexing popup.
|
||||||
if (popupFn && file.size() >= MIN_SIZE_FOR_POPUP) {
|
if (popupFn && parseFile_.size() >= MIN_SIZE_FOR_POPUP) {
|
||||||
popupFn();
|
popupFn();
|
||||||
}
|
}
|
||||||
|
|
||||||
XML_SetUserData(parser, this);
|
XML_SetUserData(xmlParser_, this);
|
||||||
XML_SetElementHandler(parser, startElement, endElement);
|
XML_SetElementHandler(xmlParser_, startElement, endElement);
|
||||||
XML_SetCharacterDataHandler(parser, characterData);
|
XML_SetCharacterDataHandler(xmlParser_, characterData);
|
||||||
|
|
||||||
// Compute the time taken to parse and build pages
|
parseStartTime_ = millis();
|
||||||
const uint32_t chapterStartTime = millis();
|
return true;
|
||||||
do {
|
}
|
||||||
void* const buf = XML_GetBuffer(parser, PARSE_BUFFER_SIZE);
|
|
||||||
if (!buf) {
|
|
||||||
LOG_ERR("EHP", "Couldn't allocate memory for buffer");
|
|
||||||
destroyXmlParser(parser);
|
|
||||||
file.close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const size_t len = file.read(buf, PARSE_BUFFER_SIZE);
|
ChapterHtmlSlimParser::ParseStatus ChapterHtmlSlimParser::parseStep() {
|
||||||
|
void* const buf = XML_GetBuffer(xmlParser_, PARSE_BUFFER_SIZE);
|
||||||
|
if (!buf) {
|
||||||
|
LOG_ERR("EHP", "Couldn't allocate memory for buffer");
|
||||||
|
return ParseStatus::Error;
|
||||||
|
}
|
||||||
|
|
||||||
if (len == 0 && file.available() > 0) {
|
const size_t len = parseFile_.read(buf, PARSE_BUFFER_SIZE);
|
||||||
LOG_ERR("EHP", "File read error");
|
|
||||||
destroyXmlParser(parser);
|
|
||||||
file.close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
done = file.available() == 0;
|
if (len == 0 && parseFile_.available() > 0) {
|
||||||
|
LOG_ERR("EHP", "File read error");
|
||||||
|
return ParseStatus::Error;
|
||||||
|
}
|
||||||
|
|
||||||
if (XML_ParseBuffer(parser, static_cast<int>(len), done) == XML_STATUS_ERROR) {
|
const int done = parseFile_.available() == 0;
|
||||||
LOG_ERR("EHP", "Parse error at line %lu:\n%s", XML_GetCurrentLineNumber(parser),
|
|
||||||
XML_ErrorString(XML_GetErrorCode(parser)));
|
|
||||||
destroyXmlParser(parser);
|
|
||||||
file.close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} while (!done);
|
|
||||||
LOG_DBG("EHP", "Time to parse and build pages: %lu ms", millis() - chapterStartTime);
|
|
||||||
|
|
||||||
destroyXmlParser(parser);
|
if (XML_ParseBuffer(xmlParser_, static_cast<int>(len), done) == XML_STATUS_ERROR) {
|
||||||
file.close();
|
LOG_ERR("EHP", "Parse error at line %lu:\n%s", XML_GetCurrentLineNumber(xmlParser_),
|
||||||
|
XML_ErrorString(XML_GetErrorCode(xmlParser_)));
|
||||||
|
return ParseStatus::Error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return done ? ParseStatus::Done : ParseStatus::More;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChapterHtmlSlimParser::abortParse() {
|
||||||
|
if (xmlParser_) {
|
||||||
|
destroyXmlParser(xmlParser_);
|
||||||
|
xmlParser_ = nullptr;
|
||||||
|
}
|
||||||
|
// Only close the file if it was successfully opened in beginParse()
|
||||||
|
if (parseFile_.isOpen()) {
|
||||||
|
parseFile_.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ChapterHtmlSlimParser::finishParse() {
|
||||||
|
if (xmlParser_) {
|
||||||
|
LOG_DBG("EHP", "Time to parse and build pages: %lu ms", millis() - parseStartTime_);
|
||||||
|
destroyXmlParser(xmlParser_);
|
||||||
|
xmlParser_ = nullptr;
|
||||||
|
}
|
||||||
|
parseFile_.close();
|
||||||
|
|
||||||
// Process last page if there is still text
|
// Process last page if there is still text
|
||||||
if (currentTextBlock) {
|
if (currentTextBlock) {
|
||||||
@@ -1349,6 +1384,23 @@ bool ChapterHtmlSlimParser::parseAndBuildPages() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ChapterHtmlSlimParser::parseAndBuildPages() {
|
||||||
|
if (!beginParse()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (;;) {
|
||||||
|
const ParseStatus status = parseStep();
|
||||||
|
if (status == ParseStatus::Error) {
|
||||||
|
abortParse();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (status == ParseStatus::Done) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return finishParse();
|
||||||
|
}
|
||||||
|
|
||||||
void ChapterHtmlSlimParser::addLineToPage(std::shared_ptr<TextBlock> line) {
|
void ChapterHtmlSlimParser::addLineToPage(std::shared_ptr<TextBlock> line) {
|
||||||
const int lineHeight = renderer.getLineHeight(fontId) * lineCompression;
|
const int lineHeight = renderer.getLineHeight(fontId) * lineCompression;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <HalStorage.h>
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
|
|
||||||
#include <climits>
|
#include <climits>
|
||||||
@@ -31,7 +32,6 @@ class ChapterHtmlSlimParser {
|
|||||||
int skipUntilDepth = INT_MAX;
|
int skipUntilDepth = INT_MAX;
|
||||||
int boldUntilDepth = INT_MAX;
|
int boldUntilDepth = INT_MAX;
|
||||||
int italicUntilDepth = INT_MAX;
|
int italicUntilDepth = INT_MAX;
|
||||||
int underlineUntilDepth = INT_MAX;
|
|
||||||
// buffer for building up words from characters, will auto break if longer than this
|
// buffer for building up words from characters, will auto break if longer than this
|
||||||
// leave one char at end for null pointer
|
// leave one char at end for null pointer
|
||||||
char partWordBuffer[MAX_WORD_SIZE + 1] = {};
|
char partWordBuffer[MAX_WORD_SIZE + 1] = {};
|
||||||
@@ -60,7 +60,8 @@ class ChapterHtmlSlimParser {
|
|||||||
int depth = 0;
|
int depth = 0;
|
||||||
bool hasBold = false, bold = false;
|
bool hasBold = false, bold = false;
|
||||||
bool hasItalic = false, italic = false;
|
bool hasItalic = false, italic = false;
|
||||||
bool hasUnderline = false, underline = false;
|
bool hasTextDecoration = false;
|
||||||
|
CssTextDecoration textDecoration = CssTextDecoration::None;
|
||||||
bool hasDirection = false;
|
bool hasDirection = false;
|
||||||
CssTextDirection direction = CssTextDirection::Ltr;
|
CssTextDirection direction = CssTextDirection::Ltr;
|
||||||
bool hasSup = false, sup = false;
|
bool hasSup = false, sup = false;
|
||||||
@@ -71,7 +72,7 @@ class ChapterHtmlSlimParser {
|
|||||||
CssStyle currentCssStyle;
|
CssStyle currentCssStyle;
|
||||||
bool effectiveBold = false;
|
bool effectiveBold = false;
|
||||||
bool effectiveItalic = false;
|
bool effectiveItalic = false;
|
||||||
bool effectiveUnderline = false;
|
CssTextDecoration effectiveTextDecoration = CssTextDecoration::None;
|
||||||
bool effectiveDirectionDefined = false;
|
bool effectiveDirectionDefined = false;
|
||||||
CssTextDirection effectiveDirection = CssTextDirection::Ltr;
|
CssTextDirection effectiveDirection = CssTextDirection::Ltr;
|
||||||
bool effectiveSup = false;
|
bool effectiveSup = false;
|
||||||
@@ -96,12 +97,25 @@ class ChapterHtmlSlimParser {
|
|||||||
std::vector<std::pair<int, FootnoteEntry>> pendingFootnotes; // <wordIndex, entry>
|
std::vector<std::pair<int, FootnoteEntry>> pendingFootnotes; // <wordIndex, entry>
|
||||||
int wordsExtractedInBlock = 0;
|
int wordsExtractedInBlock = 0;
|
||||||
|
|
||||||
|
// Resumable parse state. The one-shot parseAndBuildPages() drives these
|
||||||
|
// internally; the incremental section builder drives them across render ticks
|
||||||
|
// so a large single chapter can yield between pages instead of blocking the UI
|
||||||
|
// until the whole thing is laid out. parseFile_ and the expat parser stay alive
|
||||||
|
// for the lifetime of the parse so it can be paused and resumed at buffer
|
||||||
|
// boundaries.
|
||||||
|
XML_Parser xmlParser_ = nullptr;
|
||||||
|
HalFile parseFile_;
|
||||||
|
uint32_t parseStartTime_ = 0;
|
||||||
|
|
||||||
void updateEffectiveInlineStyle();
|
void updateEffectiveInlineStyle();
|
||||||
void startNewTextBlock(const BlockStyle& blockStyle);
|
void startNewTextBlock(const BlockStyle& blockStyle);
|
||||||
void flushPendingAnchor();
|
void flushPendingAnchor();
|
||||||
void flushPartWordBuffer();
|
void flushPartWordBuffer();
|
||||||
void makePages();
|
void makePages();
|
||||||
|
static EpdFontFamily::Style fontStyleForTextDecoration(CssTextDecoration decoration);
|
||||||
static void applyDirectionToEntry(StyleStackEntry& entry, const CssStyle& css);
|
static void applyDirectionToEntry(StyleStackEntry& entry, const CssStyle& css);
|
||||||
|
static void applyTextDecorationToEntry(StyleStackEntry& entry, const CssStyle& css);
|
||||||
|
void pushDecorationStyleEntry(CssTextDecoration defaultDecoration, const CssStyle& cssStyle);
|
||||||
void emitHorizontalRule(const BlockStyle& blockStyle);
|
void emitHorizontalRule(const BlockStyle& blockStyle);
|
||||||
// XML callbacks
|
// XML callbacks
|
||||||
static void XMLCALL startElement(void* userData, const XML_Char* name, const XML_Char** atts);
|
static void XMLCALL startElement(void* userData, const XML_Char* name, const XML_Char** atts);
|
||||||
@@ -141,8 +155,28 @@ class ChapterHtmlSlimParser {
|
|||||||
imageBasePath(imageBasePath),
|
imageBasePath(imageBasePath),
|
||||||
tocAnchors(std::move(tocAnchors)) {}
|
tocAnchors(std::move(tocAnchors)) {}
|
||||||
|
|
||||||
~ChapterHtmlSlimParser() = default;
|
~ChapterHtmlSlimParser();
|
||||||
|
|
||||||
|
// One-shot parse: builds every page before returning (begin + step* + finish).
|
||||||
bool parseAndBuildPages();
|
bool parseAndBuildPages();
|
||||||
|
|
||||||
|
// Resumable parse, for the incremental section builder. Drive as:
|
||||||
|
// if (!beginParse()) fail;
|
||||||
|
// loop: switch (parseStep()) { More: keep going / yield; Done: finishParse(); Error: abortParse(); }
|
||||||
|
// Pages are emitted via completePageFn as they complete during parseStep(), so
|
||||||
|
// the caller can stop once enough pages are built and resume on a later tick.
|
||||||
|
enum class ParseStatus { More, Done, Error };
|
||||||
|
bool beginParse();
|
||||||
|
ParseStatus parseStep();
|
||||||
|
bool finishParse(); // flush the trailing page and tear down; returns true
|
||||||
|
void abortParse(); // tear down without flushing (error / abandon)
|
||||||
|
|
||||||
void addLineToPage(std::shared_ptr<TextBlock> line);
|
void addLineToPage(std::shared_ptr<TextBlock> line);
|
||||||
const std::vector<std::pair<std::string, uint16_t>>& getAnchors() const { return anchorData; }
|
const std::vector<std::pair<std::string, uint16_t>>& getAnchors() const { return anchorData; }
|
||||||
|
|
||||||
|
// Byte progress of the in-flight parse, used to estimate a still-building section's total page
|
||||||
|
// count (a giant single-spine book never fully lays out, so its real count is unknown). Valid
|
||||||
|
// between beginParse() and finishParse()/abortParse().
|
||||||
|
size_t parseBytesConsumed() { return parseFile_ ? parseFile_.position() : 0; }
|
||||||
|
size_t parseTotalBytes() { return parseFile_ ? parseFile_.size() : 0; }
|
||||||
};
|
};
|
||||||
@@ -150,6 +150,7 @@ void XMLCALL ContentOpfParser::startElement(void* userData, const XML_Char* name
|
|||||||
|
|
||||||
if (self->state == IN_PACKAGE && (strcmp(name, "guide") == 0 || strcmp(name, "opf:guide") == 0)) {
|
if (self->state == IN_PACKAGE && (strcmp(name, "guide") == 0 || strcmp(name, "opf:guide") == 0)) {
|
||||||
self->state = IN_GUIDE;
|
self->state = IN_GUIDE;
|
||||||
|
// TODO Remove print
|
||||||
LOG_DBG("COF", "Entering guide state.");
|
LOG_DBG("COF", "Entering guide state.");
|
||||||
if (!Storage.openFileForRead("COF", self->cachePath + itemCacheFile, self->tempItemStore)) {
|
if (!Storage.openFileForRead("COF", self->cachePath + itemCacheFile, self->tempItemStore)) {
|
||||||
LOG_ERR("COF", "Couldn't open temp items file for reading. This is probably going to be a fatal error.");
|
LOG_ERR("COF", "Couldn't open temp items file for reading. This is probably going to be a fatal error.");
|
||||||
|
|||||||
+70
-54
@@ -3,6 +3,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <string_view>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace FsHelpers {
|
namespace FsHelpers {
|
||||||
@@ -36,12 +37,14 @@ std::string decodeUriEscapes(const std::string& path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string normalisePath(const std::string& path) {
|
std::string normalisePath(const std::string& path) {
|
||||||
std::vector<std::string> components;
|
std::vector<std::string_view> components;
|
||||||
std::string component;
|
components.reserve(8); // Eight nested folders is more than we might expect
|
||||||
|
|
||||||
for (const auto c : path) {
|
size_t start = 0;
|
||||||
if (c == '/') {
|
for (size_t i = 0; i <= path.length(); ++i) {
|
||||||
if (!component.empty()) {
|
if (i == path.length() || path[i] == '/') {
|
||||||
|
if (i > start) {
|
||||||
|
std::string_view component(path.data() + start, i - start);
|
||||||
if (component == "..") {
|
if (component == "..") {
|
||||||
if (!components.empty()) {
|
if (!components.empty()) {
|
||||||
components.pop_back();
|
components.pop_back();
|
||||||
@@ -49,28 +52,80 @@ std::string normalisePath(const std::string& path) {
|
|||||||
} else {
|
} else {
|
||||||
components.push_back(component);
|
components.push_back(component);
|
||||||
}
|
}
|
||||||
component.clear();
|
|
||||||
}
|
}
|
||||||
} else {
|
start = i + 1;
|
||||||
component += c;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!component.empty()) {
|
if (components.empty()) {
|
||||||
components.push_back(component);
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t total_len = 0;
|
||||||
|
for (const auto& c : components) {
|
||||||
|
total_len += c.length() + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string result;
|
std::string result;
|
||||||
for (const auto& c : components) {
|
result.reserve(total_len - 1);
|
||||||
if (!result.empty()) {
|
|
||||||
result += "/";
|
for (size_t i = 0; i < components.size(); ++i) {
|
||||||
|
if (i > 0) {
|
||||||
|
result += '/';
|
||||||
}
|
}
|
||||||
result += c;
|
result.append(components[i].data(), components[i].length());
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool naturalLess(const std::string& str1, const std::string& str2) {
|
||||||
|
// Naive natural sort: numeric-aware, case-insensitive
|
||||||
|
const char* s1 = str1.c_str();
|
||||||
|
const char* s2 = str2.c_str();
|
||||||
|
|
||||||
|
// ctype functions require unsigned char values: passing a negative char (UTF-8
|
||||||
|
// bytes above 0x7f with signed char) is undefined behavior
|
||||||
|
const auto isDigit = [](const char c) { return isdigit(static_cast<unsigned char>(c)) != 0; };
|
||||||
|
|
||||||
|
// Iterate while both strings have characters
|
||||||
|
while (*s1 && *s2) {
|
||||||
|
// Check if both are at the start of a number
|
||||||
|
if (isDigit(*s1) && isDigit(*s2)) {
|
||||||
|
// Skip leading zeros and track them
|
||||||
|
while (*s1 == '0') s1++;
|
||||||
|
while (*s2 == '0') s2++;
|
||||||
|
|
||||||
|
// Count digits to compare lengths first
|
||||||
|
int len1 = 0, len2 = 0;
|
||||||
|
while (isDigit(s1[len1])) len1++;
|
||||||
|
while (isDigit(s2[len2])) len2++;
|
||||||
|
|
||||||
|
// Different length so return smaller integer value
|
||||||
|
if (len1 != len2) return len1 < len2;
|
||||||
|
|
||||||
|
// Same length so compare digit by digit
|
||||||
|
for (int i = 0; i < len1; i++) {
|
||||||
|
if (s1[i] != s2[i]) return s1[i] < s2[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Numbers equal so advance pointers
|
||||||
|
s1 += len1;
|
||||||
|
s2 += len2;
|
||||||
|
} else {
|
||||||
|
// Regular case-insensitive character comparison
|
||||||
|
const int c1 = tolower(static_cast<unsigned char>(*s1));
|
||||||
|
const int c2 = tolower(static_cast<unsigned char>(*s2));
|
||||||
|
if (c1 != c2) return c1 < c2;
|
||||||
|
s1++;
|
||||||
|
s2++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// One string is prefix of other
|
||||||
|
return *s1 == '\0' && *s2 != '\0';
|
||||||
|
}
|
||||||
|
|
||||||
void sortFileList(std::vector<std::string>& strs) {
|
void sortFileList(std::vector<std::string>& strs) {
|
||||||
std::sort(begin(strs), end(strs), [](const std::string& str1, const std::string& str2) {
|
std::sort(begin(strs), end(strs), [](const std::string& str1, const std::string& str2) {
|
||||||
// Directories first
|
// Directories first
|
||||||
@@ -78,46 +133,7 @@ void sortFileList(std::vector<std::string>& strs) {
|
|||||||
bool isDir2 = str2.back() == '/';
|
bool isDir2 = str2.back() == '/';
|
||||||
if (isDir1 != isDir2) return isDir1;
|
if (isDir1 != isDir2) return isDir1;
|
||||||
|
|
||||||
// Start naive natural sort
|
return naturalLess(str1, str2);
|
||||||
const char* s1 = str1.c_str();
|
|
||||||
const char* s2 = str2.c_str();
|
|
||||||
|
|
||||||
// Iterate while both strings have characters
|
|
||||||
while (*s1 && *s2) {
|
|
||||||
// Check if both are at the start of a number
|
|
||||||
if (isdigit(*s1) && isdigit(*s2)) {
|
|
||||||
// Skip leading zeros and track them
|
|
||||||
while (*s1 == '0') s1++;
|
|
||||||
while (*s2 == '0') s2++;
|
|
||||||
|
|
||||||
// Count digits to compare lengths first
|
|
||||||
int len1 = 0, len2 = 0;
|
|
||||||
while (isdigit(s1[len1])) len1++;
|
|
||||||
while (isdigit(s2[len2])) len2++;
|
|
||||||
|
|
||||||
// Different length so return smaller integer value
|
|
||||||
if (len1 != len2) return len1 < len2;
|
|
||||||
|
|
||||||
// Same length so compare digit by digit
|
|
||||||
for (int i = 0; i < len1; i++) {
|
|
||||||
if (s1[i] != s2[i]) return s1[i] < s2[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Numbers equal so advance pointers
|
|
||||||
s1 += len1;
|
|
||||||
s2 += len2;
|
|
||||||
} else {
|
|
||||||
// Regular case-insensitive character comparison
|
|
||||||
char c1 = tolower(*s1);
|
|
||||||
char c2 = tolower(*s2);
|
|
||||||
if (c1 != c2) return c1 < c2;
|
|
||||||
s1++;
|
|
||||||
s2++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// One string is prefix of other
|
|
||||||
return *s1 == '\0' && *s2 != '\0';
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ std::string decodeUriEscapes(const std::string& path);
|
|||||||
|
|
||||||
std::string normalisePath(const std::string& path);
|
std::string normalisePath(const std::string& path);
|
||||||
|
|
||||||
|
// Numeric-aware, case-insensitive comparison ("2" < "10"). Returns true when str1 orders
|
||||||
|
// before str2. Same ordering sortFileList applies within the file/directory groups.
|
||||||
|
bool naturalLess(const std::string& str1, const std::string& str2);
|
||||||
|
|
||||||
void sortFileList(std::vector<std::string>& strs);
|
void sortFileList(std::vector<std::string>& strs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+245
-112
@@ -3,7 +3,6 @@
|
|||||||
#include <BidiUtils.h>
|
#include <BidiUtils.h>
|
||||||
#include <FontDecompressor.h>
|
#include <FontDecompressor.h>
|
||||||
#include <HalGPIO.h>
|
#include <HalGPIO.h>
|
||||||
#include <Icon.h>
|
|
||||||
#include <Logging.h>
|
#include <Logging.h>
|
||||||
#include <SdCardFont.h>
|
#include <SdCardFont.h>
|
||||||
#include <Utf8.h>
|
#include <Utf8.h>
|
||||||
@@ -101,23 +100,6 @@ void GfxRenderer::insertFont(const int fontId, EpdFontFamily font) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxRenderer::setUiFontRemap(const int* from, const int* to, int count) {
|
|
||||||
if (count < 0) count = 0;
|
|
||||||
if (count > MAX_UI_FONT_REMAP) count = MAX_UI_FONT_REMAP;
|
|
||||||
for (int i = 0; i < count; ++i) {
|
|
||||||
uiFontFrom_[i] = from[i];
|
|
||||||
uiFontTo_[i] = to[i];
|
|
||||||
}
|
|
||||||
uiFontRemapCount_ = count;
|
|
||||||
}
|
|
||||||
|
|
||||||
int GfxRenderer::remapUiFont(const int fontId) const {
|
|
||||||
for (int i = 0; i < uiFontRemapCount_; ++i) {
|
|
||||||
if (uiFontFrom_[i] == fontId) return uiFontTo_[i];
|
|
||||||
}
|
|
||||||
return fontId;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Translate logical (x,y) coordinates to physical panel coordinates based on current orientation
|
// Translate logical (x,y) coordinates to physical panel coordinates based on current orientation
|
||||||
// This should always be inlined for better performance
|
// This should always be inlined for better performance
|
||||||
static inline void rotateCoordinates(const GfxRenderer::Orientation orientation, const int x, const int y, int* phyX,
|
static inline void rotateCoordinates(const GfxRenderer::Orientation orientation, const int x, const int y, int* phyX,
|
||||||
@@ -300,8 +282,17 @@ static void renderCharImpl(const GfxRenderer& renderer, GfxRenderer::RenderMode
|
|||||||
const uint8_t bmpVal = 3 - ((byte >> bit_index) & 0x3);
|
const uint8_t bmpVal = 3 - ((byte >> bit_index) & 0x3);
|
||||||
|
|
||||||
if (renderMode == GfxRenderer::BW && bmpVal < 3) {
|
if (renderMode == GfxRenderer::BW && bmpVal < 3) {
|
||||||
// Black (also paints over the grays in BW mode)
|
// Default: gray pixels paint solid black. Required when grayscale
|
||||||
renderer.drawPixel(screenX, screenY, pixelState);
|
// passes follow (their LUT lightens pixels it assumes were just
|
||||||
|
// driven solid black), and it is the plain non-AA look otherwise.
|
||||||
|
// Fast AA: partial (anti-aliased edge) coverage dithers with the
|
||||||
|
// same period-2 patterns as fillRectDither (dark grey = 50%
|
||||||
|
// checkerboard, light grey = 25%), approximating AA in a single
|
||||||
|
// BW pass. Skipped pixels leave the background untouched.
|
||||||
|
if (!renderer.isFastAntiAliasing() || bmpVal == 0 || (bmpVal == 1 && ((screenX + screenY) & 1) == 0) ||
|
||||||
|
(bmpVal == 2 && (screenX & 1) == 0 && (screenY & 1) == 0)) {
|
||||||
|
renderer.drawPixel(screenX, screenY, pixelState);
|
||||||
|
}
|
||||||
} else if (renderMode == GfxRenderer::GRAYSCALE_MSB && (bmpVal == 1 || bmpVal == 2)) {
|
} else if (renderMode == GfxRenderer::GRAYSCALE_MSB && (bmpVal == 1 || bmpVal == 2)) {
|
||||||
// Light gray (also mark the MSB if it's going to be a dark gray too)
|
// Light gray (also mark the MSB if it's going to be a dark gray too)
|
||||||
// Dedicated X3 gray LUTs now provide proper 4-level gray on both devices
|
// Dedicated X3 gray LUTs now provide proper 4-level gray on both devices
|
||||||
@@ -383,7 +374,7 @@ int GfxRenderer::getTextWidth(const int fontId, const char* text, const EpdFontF
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) {
|
if (fontIt == fontMap.end()) {
|
||||||
LOG_ERR("GFX", "Font %d not found", fontId);
|
LOG_ERR("GFX", "Font %d not found", fontId);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -425,7 +416,7 @@ void GfxRenderer::drawText(const int fontId, const int x, const int y, const cha
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) {
|
if (fontIt == fontMap.end()) {
|
||||||
LOG_ERR("GFX", "Font %d not found", fontId);
|
LOG_ERR("GFX", "Font %d not found", fontId);
|
||||||
return;
|
return;
|
||||||
@@ -679,8 +670,10 @@ void GfxRenderer::drawRoundedRect(const int x, const int y, const int width, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GfxRenderer::fillRect(const int x, const int y, const int width, const int height, const bool state) const {
|
void GfxRenderer::fillRect(const int x, const int y, const int width, const int height, const bool state) const {
|
||||||
for (int fillY = y; fillY < y + height; fillY++) {
|
if (state) {
|
||||||
drawLine(x, fillY, x + width - 1, fillY, state);
|
fillRectImpl<Color::Black>(x, y, width, height);
|
||||||
|
} else {
|
||||||
|
fillRectImpl<Color::White>(x, y, width, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -712,26 +705,194 @@ void GfxRenderer::drawPixelDither<Color::DarkGray>(const int x, const int y) con
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GfxRenderer::fillRectDither(const int x, const int y, const int width, const int height, Color color) const {
|
void GfxRenderer::fillRectDither(const int x, const int y, const int width, const int height, Color color) const {
|
||||||
if (color == Color::Clear) {
|
switch (color) {
|
||||||
} else if (color == Color::Black) {
|
case Color::Clear:
|
||||||
fillRect(x, y, width, height, true);
|
break;
|
||||||
} else if (color == Color::White) {
|
case Color::Black:
|
||||||
fillRect(x, y, width, height, false);
|
fillRectImpl<Color::Black>(x, y, width, height);
|
||||||
} else if (color == Color::LightGray) {
|
break;
|
||||||
for (int fillY = y; fillY < y + height; fillY++) {
|
case Color::White:
|
||||||
for (int fillX = x; fillX < x + width; fillX++) {
|
fillRectImpl<Color::White>(x, y, width, height);
|
||||||
drawPixelDither<Color::LightGray>(fillX, fillY);
|
break;
|
||||||
|
case Color::LightGray:
|
||||||
|
fillRectImpl<Color::LightGray>(x, y, width, height);
|
||||||
|
break;
|
||||||
|
case Color::DarkGray:
|
||||||
|
fillRectImpl<Color::DarkGray>(x, y, width, height);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <Color C>
|
||||||
|
void GfxRenderer::fillRectImpl(const int x, const int y, const int width, const int height) const {
|
||||||
|
if constexpr (C == Color::Clear) return;
|
||||||
|
if (width <= 0 || height <= 0) return;
|
||||||
|
if (fontCacheManager_ && fontCacheManager_->isScanning()) return;
|
||||||
|
|
||||||
|
// Clip in logical space.
|
||||||
|
const int screenW = getScreenWidth();
|
||||||
|
const int screenH = getScreenHeight();
|
||||||
|
const int lx0 = std::max(0, x);
|
||||||
|
const int ly0 = std::max(0, y);
|
||||||
|
const int lx1 = std::min(screenW, x + width);
|
||||||
|
const int ly1 = std::min(screenH, y + height);
|
||||||
|
if (lx0 >= lx1 || ly0 >= ly1) return;
|
||||||
|
|
||||||
|
// Rotate the two opposing logical corners into physical-framebuffer space.
|
||||||
|
// The bounding rect in physical space is the rect we need to fill — rotation
|
||||||
|
// is rigid (no shear/stretch) so the bbox of the two corners IS the rect.
|
||||||
|
int paX, paY, pbX, pbY;
|
||||||
|
rotateCoordinates(orientation, lx0, ly0, &paX, &paY, panelWidth, panelHeight);
|
||||||
|
rotateCoordinates(orientation, lx1 - 1, ly1 - 1, &pbX, &pbY, panelWidth, panelHeight);
|
||||||
|
|
||||||
|
const int phyX0 = std::min(paX, pbX);
|
||||||
|
const int phyX1 = std::max(paX, pbX); // inclusive
|
||||||
|
int phyY0 = std::min(paY, pbY);
|
||||||
|
int phyY1 = std::max(paY, pbY);
|
||||||
|
|
||||||
|
// Strip mode: clip Y range to the active band and redirect writes.
|
||||||
|
uint8_t* target = getWriteTarget();
|
||||||
|
const int originY = getWriteOriginY();
|
||||||
|
const int writeRows = getWriteRows();
|
||||||
|
phyY0 = std::max(phyY0, originY);
|
||||||
|
phyY1 = std::min(phyY1, originY + writeRows - 1);
|
||||||
|
if (phyY0 > phyY1) return;
|
||||||
|
|
||||||
|
// Bit/byte layout: MSB-first within a byte, so phyX → bit (7 - (phyX & 7)).
|
||||||
|
// Head and tail masks cover only the in-rect bits of the first/last byte.
|
||||||
|
const int byteStart = phyX0 >> 3;
|
||||||
|
const int byteEnd = phyX1 >> 3; // inclusive
|
||||||
|
const uint8_t headMask = static_cast<uint8_t>(0xFFu >> (phyX0 & 7));
|
||||||
|
const uint8_t tailMask = static_cast<uint8_t>(0xFFu << (7 - (phyX1 & 7)));
|
||||||
|
const int32_t panelStride = static_cast<int32_t>(panelWidthBytes);
|
||||||
|
|
||||||
|
if constexpr (C == Color::Black || C == Color::White) {
|
||||||
|
// Solid fill. Framebuffer: 0 = black, 1 = white.
|
||||||
|
const uint8_t fillByte = (C == Color::Black) ? 0x00u : 0xFFu;
|
||||||
|
for (int py = phyY0; py <= phyY1; ++py) {
|
||||||
|
uint8_t* row = target + static_cast<int32_t>(py - originY) * panelStride;
|
||||||
|
if (byteStart == byteEnd) {
|
||||||
|
const uint8_t mask = headMask & tailMask;
|
||||||
|
if constexpr (C == Color::Black) {
|
||||||
|
row[byteStart] &= static_cast<uint8_t>(~mask);
|
||||||
|
} else {
|
||||||
|
row[byteStart] |= mask;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if constexpr (C == Color::Black) {
|
||||||
|
row[byteStart] &= static_cast<uint8_t>(~headMask);
|
||||||
|
if (byteEnd > byteStart + 1) {
|
||||||
|
memset(row + byteStart + 1, fillByte, byteEnd - byteStart - 1);
|
||||||
|
}
|
||||||
|
row[byteEnd] &= static_cast<uint8_t>(~tailMask);
|
||||||
|
} else {
|
||||||
|
row[byteStart] |= headMask;
|
||||||
|
if (byteEnd > byteStart + 1) {
|
||||||
|
memset(row + byteStart + 1, fillByte, byteEnd - byteStart - 1);
|
||||||
|
}
|
||||||
|
row[byteEnd] |= tailMask;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (color == Color::DarkGray) {
|
} else {
|
||||||
for (int fillY = y; fillY < y + height; fillY++) {
|
// Dither (LightGray / DarkGray). Both patterns have period 2 in logical
|
||||||
for (int fillX = x; fillX < x + width; fillX++) {
|
// (x, y), so per physical row we precompute one byte that represents the
|
||||||
drawPixelDither<Color::DarkGray>(fillX, fillY);
|
// pattern across an 8-pixel stretch — every full byte in the row uses
|
||||||
|
// that same value.
|
||||||
|
//
|
||||||
|
// dlxPerPhyX / dlyPerPhyX: how logical (x, y) change as phyX increments
|
||||||
|
// along a physical row. Derived from inverting rotateCoordinates.
|
||||||
|
int dlxPerPhyX = 0, dlyPerPhyX = 0;
|
||||||
|
switch (orientation) {
|
||||||
|
case Portrait:
|
||||||
|
dlxPerPhyX = 0;
|
||||||
|
dlyPerPhyX = 1;
|
||||||
|
break;
|
||||||
|
case PortraitInverted:
|
||||||
|
dlxPerPhyX = 0;
|
||||||
|
dlyPerPhyX = -1;
|
||||||
|
break;
|
||||||
|
case LandscapeClockwise:
|
||||||
|
dlxPerPhyX = -1;
|
||||||
|
dlyPerPhyX = 0;
|
||||||
|
break;
|
||||||
|
case LandscapeCounterClockwise:
|
||||||
|
dlxPerPhyX = 1;
|
||||||
|
dlyPerPhyX = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The dither pattern has period 2 in logical space, and each orientation
|
||||||
|
// maps py to logical coords with a fixed parity relationship. The
|
||||||
|
// blackMask byte therefore repeats with period 2 in py. Precompute both
|
||||||
|
// variants outside the row loop to eliminate the per-row switch + 8-bit
|
||||||
|
// construction loop.
|
||||||
|
uint8_t blackMasks[2];
|
||||||
|
for (int parityIdx = 0; parityIdx < 2; ++parityIdx) {
|
||||||
|
const int samplePy = phyY0 + parityIdx;
|
||||||
|
int lxBase = 0, lyBase = 0;
|
||||||
|
switch (orientation) {
|
||||||
|
case Portrait:
|
||||||
|
lxBase = panelHeight - 1 - samplePy;
|
||||||
|
lyBase = byteStart * 8;
|
||||||
|
break;
|
||||||
|
case PortraitInverted:
|
||||||
|
lxBase = samplePy;
|
||||||
|
lyBase = panelWidth - 1 - byteStart * 8;
|
||||||
|
break;
|
||||||
|
case LandscapeClockwise:
|
||||||
|
lxBase = panelWidth - 1 - byteStart * 8;
|
||||||
|
lyBase = panelHeight - 1 - samplePy;
|
||||||
|
break;
|
||||||
|
case LandscapeCounterClockwise:
|
||||||
|
lxBase = byteStart * 8;
|
||||||
|
lyBase = samplePy;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
uint8_t mask = 0;
|
||||||
|
for (int b = 0; b < 8; ++b) {
|
||||||
|
const int lx = lxBase + b * dlxPerPhyX;
|
||||||
|
const int ly = lyBase + b * dlyPerPhyX;
|
||||||
|
bool isBlack;
|
||||||
|
if constexpr (C == Color::LightGray) {
|
||||||
|
isBlack = ((lx & 1) == 0) && ((ly & 1) == 0);
|
||||||
|
} else { // DarkGray
|
||||||
|
isBlack = (((lx + ly) & 1) == 0);
|
||||||
|
}
|
||||||
|
if (isBlack) mask |= static_cast<uint8_t>(1u << (7 - b));
|
||||||
|
}
|
||||||
|
blackMasks[samplePy & 1] = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int py = phyY0; py <= phyY1; ++py) {
|
||||||
|
const uint8_t blackMask = blackMasks[py & 1];
|
||||||
|
const uint8_t whiteMask = static_cast<uint8_t>(~blackMask);
|
||||||
|
|
||||||
|
// Dither writes BOTH inks (the slow path called drawPixel for every
|
||||||
|
// pixel — setting or clearing — so we must do the same). Inside the
|
||||||
|
// rect mask: write whiteMask (1s where white, 0s where black). Outside
|
||||||
|
// the rect mask: leave the framebuffer untouched.
|
||||||
|
uint8_t* row = target + static_cast<int32_t>(py - originY) * panelStride;
|
||||||
|
if (byteStart == byteEnd) {
|
||||||
|
const uint8_t rectMask = headMask & tailMask;
|
||||||
|
row[byteStart] = static_cast<uint8_t>((row[byteStart] & ~rectMask) | (rectMask & whiteMask));
|
||||||
|
} else {
|
||||||
|
row[byteStart] = static_cast<uint8_t>((row[byteStart] & ~headMask) | (headMask & whiteMask));
|
||||||
|
if (byteEnd > byteStart + 1) {
|
||||||
|
// Period 2, so every full byte in this row is exactly whiteMask.
|
||||||
|
memset(row + byteStart + 1, whiteMask, byteEnd - byteStart - 1);
|
||||||
|
}
|
||||||
|
row[byteEnd] = static_cast<uint8_t>((row[byteEnd] & ~tailMask) | (tailMask & whiteMask));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template void GfxRenderer::fillRectImpl<Color::Black>(int, int, int, int) const;
|
||||||
|
template void GfxRenderer::fillRectImpl<Color::White>(int, int, int, int) const;
|
||||||
|
template void GfxRenderer::fillRectImpl<Color::LightGray>(int, int, int, int) const;
|
||||||
|
template void GfxRenderer::fillRectImpl<Color::DarkGray>(int, int, int, int) const;
|
||||||
|
|
||||||
void GfxRenderer::maskRoundedRectOutsideCorners(const int x, const int y, const int width, const int height,
|
void GfxRenderer::maskRoundedRectOutsideCorners(const int x, const int y, const int width, const int height,
|
||||||
const int radius, const Color color) const {
|
const int radius, const Color color) const {
|
||||||
if (radius <= 0 || color == Color::Clear) {
|
if (radius <= 0 || color == Color::Clear) {
|
||||||
@@ -902,20 +1063,21 @@ void GfxRenderer::drawImage(const uint8_t bitmap[], const int x, const int y, co
|
|||||||
display.drawImage(bitmap, rotatedX, rotatedY, width, height);
|
display.drawImage(bitmap, rotatedX, rotatedY, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxRenderer::drawIcon(const uint8_t bitmap[], const int x, const int y, const int width, const int height) const {
|
void GfxRenderer::drawIcon(const uint8_t bitmap[], const int x, const int y, const int size) const {
|
||||||
display.drawImageTransparent(bitmap, y, getScreenWidth() - width - x, height, width);
|
// Plot the icon pixel-by-pixel through drawPixel (which applies the orientation
|
||||||
}
|
// transform) instead of the byte-aligned framebuffer blit. The blit snaps the
|
||||||
|
// icon's position to 8px (one byte) along the rotated axis, which prevents it
|
||||||
void GfxRenderer::drawIcon(const freeink::Icon& icon, const int x, const int y, const bool black) const {
|
// from aligning with adjacent text; per-pixel plotting is pixel-precise.
|
||||||
// Bits are un-rotated, so each drawn pixel goes through drawPixel (which applies
|
// Icons are square and 1bpp (MSB-first, bit==0 = ink). The (size-1-row, col)
|
||||||
// the orientation transform) — correct in every orientation, unlike the legacy
|
// mapping reproduces the Portrait orientation the blit produced; drawIcon is
|
||||||
// uint8_t* overload that pre-rotates for one orientation.
|
// only called by the UI themes, which all render in forced Portrait.
|
||||||
const int rowBytes = (icon.w + 7) / 8;
|
const int rowBytes = (size + 7) / 8;
|
||||||
for (int row = 0; row < icon.h; ++row) {
|
for (int row = 0; row < size; row++) {
|
||||||
const uint8_t* r = icon.bits + static_cast<int>(row) * rowBytes;
|
for (int col = 0; col < size; col++) {
|
||||||
for (int col = 0; col < icon.w; ++col) {
|
const uint8_t byte = bitmap[row * rowBytes + (col >> 3)];
|
||||||
if (((r[col >> 3] >> (7 - (col & 7))) & 1) == 0) { // 0 = drawn
|
const bool ink = ((byte >> (7 - (col & 7))) & 1) == 0;
|
||||||
drawPixel(x + col, y + row, black);
|
if (ink) {
|
||||||
|
drawPixel(x + (size - 1 - row), y + col, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1329,38 +1491,6 @@ int GfxRenderer::getScreenHeight() const {
|
|||||||
return panelWidth;
|
return panelWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxRenderer::tapToLogical(float nx, float ny, int& outX, int& outY) const {
|
|
||||||
// Native panel pixel of the tap (wasTouchTap normalizes over the native panel).
|
|
||||||
int phyX = static_cast<int>(nx * panelWidth);
|
|
||||||
int phyY = static_cast<int>(ny * panelHeight);
|
|
||||||
if (phyX < 0) phyX = 0;
|
|
||||||
if (phyX > panelWidth - 1) phyX = panelWidth - 1;
|
|
||||||
if (phyY < 0) phyY = 0;
|
|
||||||
if (phyY > panelHeight - 1) phyY = panelHeight - 1;
|
|
||||||
|
|
||||||
// Inverse of rotateCoordinates() (see the forward transform above): map a
|
|
||||||
// physical/native point back into the current orientation's logical frame.
|
|
||||||
switch (orientation) {
|
|
||||||
case Portrait: // forward: phyX=logY, phyY=panelHeight-1-logX
|
|
||||||
outX = panelHeight - 1 - phyY;
|
|
||||||
outY = phyX;
|
|
||||||
break;
|
|
||||||
case PortraitInverted: // forward: phyX=panelWidth-1-logY, phyY=logX
|
|
||||||
outX = phyY;
|
|
||||||
outY = panelWidth - 1 - phyX;
|
|
||||||
break;
|
|
||||||
case LandscapeClockwise: // forward: phyX=panelWidth-1-logX, phyY=panelHeight-1-logY
|
|
||||||
outX = panelWidth - 1 - phyX;
|
|
||||||
outY = panelHeight - 1 - phyY;
|
|
||||||
break;
|
|
||||||
case LandscapeCounterClockwise: // forward: identity
|
|
||||||
default:
|
|
||||||
outX = phyX;
|
|
||||||
outY = phyY;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Translate a logical rect through rotateCoordinates and take the bounding
|
// Translate a logical rect through rotateCoordinates and take the bounding
|
||||||
// box of its four corners on the physical panel. Output coords are inclusive
|
// box of its four corners on the physical panel. Output coords are inclusive
|
||||||
// and clamped. Returns false if the rect ends up fully off-panel.
|
// and clamped. Returns false if the rect ends up fully off-panel.
|
||||||
@@ -1452,7 +1582,7 @@ int GfxRenderer::getSpaceWidth(const int fontId, const EpdFontFamily::Style styl
|
|||||||
return fp4::toPixel(sdIt->second->getAdvance(' ', resolvedStyle));
|
return fp4::toPixel(sdIt->second->getAdvance(' ', resolvedStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) {
|
if (fontIt == fontMap.end()) {
|
||||||
LOG_ERR("GFX", "Font %d not found", fontId);
|
LOG_ERR("GFX", "Font %d not found", fontId);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1473,7 +1603,7 @@ int GfxRenderer::getSpaceAdvance(const int fontId, const uint32_t leftCp, const
|
|||||||
return fp4::toPixel(sdIt->second->getAdvance(' ', resolvedStyle));
|
return fp4::toPixel(sdIt->second->getAdvance(' ', resolvedStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) return 0;
|
if (fontIt == fontMap.end()) return 0;
|
||||||
const auto& font = fontIt->second;
|
const auto& font = fontIt->second;
|
||||||
const EpdGlyph* spaceGlyph = font.getGlyph(' ', style);
|
const EpdGlyph* spaceGlyph = font.getGlyph(' ', style);
|
||||||
@@ -1487,7 +1617,7 @@ int GfxRenderer::getSpaceAdvance(const int fontId, const uint32_t leftCp, const
|
|||||||
|
|
||||||
int GfxRenderer::getKerning(const int fontId, const uint32_t leftCp, const uint32_t rightCp,
|
int GfxRenderer::getKerning(const int fontId, const uint32_t leftCp, const uint32_t rightCp,
|
||||||
const EpdFontFamily::Style style) const {
|
const EpdFontFamily::Style style) const {
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) return 0;
|
if (fontIt == fontMap.end()) return 0;
|
||||||
const int kernFP = fontIt->second.getKerning(leftCp, rightCp, style); // 4.4 fixed-point
|
const int kernFP = fontIt->second.getKerning(leftCp, rightCp, style); // 4.4 fixed-point
|
||||||
return fp4::toPixel(kernFP); // snap 4.4 fixed-point to nearest pixel
|
return fp4::toPixel(kernFP); // snap 4.4 fixed-point to nearest pixel
|
||||||
@@ -1519,7 +1649,7 @@ int GfxRenderer::getTextAdvanceX(const int fontId, const char* text, EpdFontFami
|
|||||||
return fp4::toPixel(widthFP);
|
return fp4::toPixel(widthFP);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) {
|
if (fontIt == fontMap.end()) {
|
||||||
LOG_ERR("GFX", "Font %d not found", fontId);
|
LOG_ERR("GFX", "Font %d not found", fontId);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1555,7 +1685,7 @@ int GfxRenderer::getTextAdvanceX(const int fontId, const char* text, EpdFontFami
|
|||||||
}
|
}
|
||||||
|
|
||||||
int GfxRenderer::getFontAscenderSize(const int fontId) const {
|
int GfxRenderer::getFontAscenderSize(const int fontId) const {
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) {
|
if (fontIt == fontMap.end()) {
|
||||||
LOG_ERR("GFX", "Font %d not found", fontId);
|
LOG_ERR("GFX", "Font %d not found", fontId);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1565,7 +1695,7 @@ int GfxRenderer::getFontAscenderSize(const int fontId) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int GfxRenderer::getLineHeight(const int fontId) const {
|
int GfxRenderer::getLineHeight(const int fontId) const {
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) {
|
if (fontIt == fontMap.end()) {
|
||||||
LOG_ERR("GFX", "Font %d not found", fontId);
|
LOG_ERR("GFX", "Font %d not found", fontId);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1575,7 +1705,7 @@ int GfxRenderer::getLineHeight(const int fontId) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int GfxRenderer::getTextHeight(const int fontId) const {
|
int GfxRenderer::getTextHeight(const int fontId) const {
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) {
|
if (fontIt == fontMap.end()) {
|
||||||
LOG_ERR("GFX", "Font %d not found", fontId);
|
LOG_ERR("GFX", "Font %d not found", fontId);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1583,27 +1713,6 @@ int GfxRenderer::getTextHeight(const int fontId) const {
|
|||||||
return fontIt->second.getData(EpdFontFamily::REGULAR)->ascender;
|
return fontIt->second.getData(EpdFontFamily::REGULAR)->ascender;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Height of a reference glyph above the baseline (glyph->top): 'H' gives the real
|
|
||||||
// cap height, the actual visible font extent for vertical centering.
|
|
||||||
int GfxRenderer::glyphTop(const int fontId, const uint32_t cp) const {
|
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
|
||||||
if (fontIt == fontMap.end()) return 0;
|
|
||||||
const EpdGlyph* g = fontIt->second.getGlyph(cp, EpdFontFamily::REGULAR);
|
|
||||||
return g ? g->top : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int GfxRenderer::getFontCapHeight(const int fontId) const { return glyphTop(fontId, 'H'); }
|
|
||||||
|
|
||||||
int GfxRenderer::getTextVisualCenterOffset(const int fontId) const {
|
|
||||||
// Cap-height middle: baseline is at top + ascender, caps reach capHeight above it,
|
|
||||||
// so the optical center is ascender - capHeight/2 below the top. Cap (not x) height
|
|
||||||
// because UI labels are capital-led. Falls back to ascender*0.65 without an 'H'.
|
|
||||||
const int ascender = getFontAscenderSize(fontId);
|
|
||||||
const int capHeight = getFontCapHeight(fontId);
|
|
||||||
if (capHeight <= 0) return (ascender * 65) / 100;
|
|
||||||
return ascender - capHeight / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GfxRenderer::drawTextRotated90CW(const int fontId, const int x, const int y, const char* text, const bool black,
|
void GfxRenderer::drawTextRotated90CW(const int fontId, const int x, const int y, const char* text, const bool black,
|
||||||
const EpdFontFamily::Style style) const {
|
const EpdFontFamily::Style style) const {
|
||||||
// Cannot draw a NULL / empty string
|
// Cannot draw a NULL / empty string
|
||||||
@@ -1611,7 +1720,7 @@ void GfxRenderer::drawTextRotated90CW(const int fontId, const int x, const int y
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto fontIt = fontMap.find(remapUiFont(fontId));
|
const auto fontIt = fontMap.find(fontId);
|
||||||
if (fontIt == fontMap.end()) {
|
if (fontIt == fontMap.end()) {
|
||||||
LOG_ERR("GFX", "Font %d not found", fontId);
|
LOG_ERR("GFX", "Font %d not found", fontId);
|
||||||
return;
|
return;
|
||||||
@@ -1673,6 +1782,30 @@ size_t GfxRenderer::getBufferSize() const { return frameBufferSize; }
|
|||||||
// unused
|
// unused
|
||||||
// void GfxRenderer::grayscaleRevert() const { display.grayscaleRevert(); }
|
// void GfxRenderer::grayscaleRevert() const { display.grayscaleRevert(); }
|
||||||
|
|
||||||
|
void GfxRenderer::displayGrayscaleBase(HalDisplay::RefreshMode fallback) const {
|
||||||
|
display.displayGrayscaleBase(fallback, fadingFix);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GfxRenderer::preconditionGrayscale() const { display.preconditionGrayscale(); }
|
||||||
|
|
||||||
|
void GfxRenderer::preconditionGrayscale(int x, int y, int w, int h) const {
|
||||||
|
if (w <= 0 || h <= 0) return;
|
||||||
|
// Rotate the logical rect's opposite corners to physical panel coords; the
|
||||||
|
// physical bbox stays axis-aligned for all four orientations.
|
||||||
|
int ax, ay, bx, by;
|
||||||
|
rotateCoordinates(orientation, x, y, &ax, &ay, panelWidth, panelHeight);
|
||||||
|
rotateCoordinates(orientation, x + w - 1, y + h - 1, &bx, &by, panelWidth, panelHeight);
|
||||||
|
int x0 = ax < bx ? ax : bx, x1 = ax > bx ? ax : bx;
|
||||||
|
int y0 = ay < by ? ay : by, y1 = ay > by ? ay : by;
|
||||||
|
if (x0 < 0) x0 = 0;
|
||||||
|
if (y0 < 0) y0 = 0;
|
||||||
|
if (x1 >= panelWidth) x1 = panelWidth - 1;
|
||||||
|
if (y1 >= panelHeight) y1 = panelHeight - 1;
|
||||||
|
if (x1 < x0 || y1 < y0) return;
|
||||||
|
display.preconditionGrayscale(static_cast<uint16_t>(x0), static_cast<uint16_t>(y0),
|
||||||
|
static_cast<uint16_t>(x1 - x0 + 1), static_cast<uint16_t>(y1 - y0 + 1));
|
||||||
|
}
|
||||||
|
|
||||||
void GfxRenderer::copyGrayscaleLsbBuffers() const { display.copyGrayscaleLsbBuffers(frameBuffer); }
|
void GfxRenderer::copyGrayscaleLsbBuffers() const { display.copyGrayscaleLsbBuffers(frameBuffer); }
|
||||||
|
|
||||||
void GfxRenderer::copyGrayscaleMsbBuffers() const { display.copyGrayscaleMsbBuffers(frameBuffer); }
|
void GfxRenderer::copyGrayscaleMsbBuffers() const { display.copyGrayscaleMsbBuffers(frameBuffer); }
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ enum class BidiBaseDir : signed char { AUTO = -1, LTR = 0, RTL = 1 };
|
|||||||
|
|
||||||
class FontCacheManager;
|
class FontCacheManager;
|
||||||
class SdCardFont;
|
class SdCardFont;
|
||||||
namespace freeink {
|
|
||||||
struct Icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <map>
|
#include <map>
|
||||||
@@ -47,6 +44,13 @@ class GfxRenderer {
|
|||||||
RenderMode renderMode;
|
RenderMode renderMode;
|
||||||
Orientation orientation;
|
Orientation orientation;
|
||||||
bool fadingFix;
|
bool fadingFix;
|
||||||
|
// Fast text anti-aliasing: when set, BW-mode rendering of 2-bit glyphs
|
||||||
|
// dithers partial-coverage (gray) pixels instead of painting them solid
|
||||||
|
// black, approximating AA in a single BW pass with no grayscale refresh.
|
||||||
|
// Must stay false when grayscale LSB/MSB passes follow the BW render: the
|
||||||
|
// gray LUT lightens pixels it assumes were just driven solid black, and
|
||||||
|
// dither-skipped white pixels would take its white-drive frames unopposed.
|
||||||
|
bool fastAntiAliasing = false;
|
||||||
uint8_t* frameBuffer = nullptr;
|
uint8_t* frameBuffer = nullptr;
|
||||||
uint16_t panelWidth = HalDisplay::DISPLAY_WIDTH;
|
uint16_t panelWidth = HalDisplay::DISPLAY_WIDTH;
|
||||||
uint16_t panelHeight = HalDisplay::DISPLAY_HEIGHT;
|
uint16_t panelHeight = HalDisplay::DISPLAY_HEIGHT;
|
||||||
@@ -54,13 +58,6 @@ class GfxRenderer {
|
|||||||
uint32_t frameBufferSize = HalDisplay::BUFFER_SIZE;
|
uint32_t frameBufferSize = HalDisplay::BUFFER_SIZE;
|
||||||
std::vector<uint8_t*> bwBufferChunks;
|
std::vector<uint8_t*> bwBufferChunks;
|
||||||
std::map<int, EpdFontFamily> fontMap;
|
std::map<int, EpdFontFamily> fontMap;
|
||||||
// UI chrome font remap table (see setUiFontRemap). Empty = identity.
|
|
||||||
static constexpr int MAX_UI_FONT_REMAP = 8;
|
|
||||||
int uiFontFrom_[MAX_UI_FONT_REMAP] = {0};
|
|
||||||
int uiFontTo_[MAX_UI_FONT_REMAP] = {0};
|
|
||||||
int uiFontRemapCount_ = 0;
|
|
||||||
int remapUiFont(int fontId) const;
|
|
||||||
int glyphTop(int fontId, uint32_t cp) const;
|
|
||||||
// Mutable because ensureSdCardFontReady() is const (called from layout code
|
// Mutable because ensureSdCardFontReady() is const (called from layout code
|
||||||
// that holds a const GfxRenderer&) but triggers SD card reads and heap
|
// that holds a const GfxRenderer&) but triggers SD card reads and heap
|
||||||
// allocation inside the SdCardFont objects. Same pragmatic compromise as
|
// allocation inside the SdCardFont objects. Same pragmatic compromise as
|
||||||
@@ -91,6 +88,12 @@ class GfxRenderer {
|
|||||||
void drawPixelDither(int x, int y) const;
|
void drawPixelDither(int x, int y) const;
|
||||||
template <Color color>
|
template <Color color>
|
||||||
void fillArc(int maxRadius, int cx, int cy, int xDir, int yDir) const;
|
void fillArc(int maxRadius, int cx, int cy, int xDir, int yDir) const;
|
||||||
|
// Byte-aligned, orientation-specialized rectangle fill. Rotates the rect's
|
||||||
|
// two opposing corners into physical-framebuffer space once, then walks each
|
||||||
|
// physical row with head-mask / middle memset / tail-mask byte writes — no
|
||||||
|
// per-pixel rotation, no per-pixel RMW.
|
||||||
|
template <Color color>
|
||||||
|
void fillRectImpl(int x, int y, int width, int height) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GfxRenderer(HalDisplay& halDisplay)
|
explicit GfxRenderer(HalDisplay& halDisplay)
|
||||||
@@ -105,14 +108,6 @@ class GfxRenderer {
|
|||||||
// Setup
|
// Setup
|
||||||
void begin(); // must be called right after display.begin()
|
void begin(); // must be called right after display.begin()
|
||||||
void insertFont(int fontId, EpdFontFamily font);
|
void insertFont(int fontId, EpdFontFamily font);
|
||||||
// Orientation-correct icon blit for the freeink::Icon format (un-rotated bits +
|
|
||||||
// optical-center metadata). Prefer this over the legacy raw-bitmap drawIcon.
|
|
||||||
void drawIcon(const freeink::Icon& icon, int x, int y, bool black = true) const;
|
|
||||||
// UI chrome font scaling: firmware supplies a small remap table (from the board
|
|
||||||
// uiScale) that substitutes a larger font for each scaled UI font id at lookup
|
|
||||||
// time, so layout and drawing stay consistent with no call-site changes. Reader
|
|
||||||
// body fonts aren't in the table, so book text is unaffected. count <= 8.
|
|
||||||
void setUiFontRemap(const int* from, const int* to, int count);
|
|
||||||
// Clears both the flash-font map and any SD-font registration for fontId.
|
// Clears both the flash-font map and any SD-font registration for fontId.
|
||||||
// Coupled to avoid dangling SdCardFont* in sdCardFonts_ when callers free
|
// Coupled to avoid dangling SdCardFont* in sdCardFonts_ when callers free
|
||||||
// the underlying SdCardFont and forget the SD-side unregister.
|
// the underlying SdCardFont and forget the SD-side unregister.
|
||||||
@@ -153,11 +148,6 @@ class GfxRenderer {
|
|||||||
void clearScreen(uint8_t color = 0xFF) const;
|
void clearScreen(uint8_t color = 0xFF) const;
|
||||||
void getOrientedViewableTRBL(int* outTop, int* outRight, int* outBottom, int* outLeft) const;
|
void getOrientedViewableTRBL(int* outTop, int* outRight, int* outBottom, int* outLeft) const;
|
||||||
|
|
||||||
// Map a touch tap (normalized 0..1 in panel-native orientation, from
|
|
||||||
// InputManager::wasTouchTap) to logical screen coordinates matching the Rects the
|
|
||||||
// UI draws in. Inverse of rotateCoordinates() for the current orientation.
|
|
||||||
void tapToLogical(float nx, float ny, int& outX, int& outY) const;
|
|
||||||
|
|
||||||
// Tiled grayscale strip target. While active, drawPixel() and clearScreen()
|
// Tiled grayscale strip target. While active, drawPixel() and clearScreen()
|
||||||
// operate on `scratch` (panelWidthBytes * stripRows bytes, holding physical
|
// operate on `scratch` (panelWidthBytes * stripRows bytes, holding physical
|
||||||
// rows [stripY0, stripY0 + stripRows)) instead of the framebuffer; pixels
|
// rows [stripY0, stripY0 + stripRows)) instead of the framebuffer; pixels
|
||||||
@@ -200,7 +190,7 @@ class GfxRenderer {
|
|||||||
void fillRoundedRect(int x, int y, int width, int height, int cornerRadius, bool roundTopLeft, bool roundTopRight,
|
void fillRoundedRect(int x, int y, int width, int height, int cornerRadius, bool roundTopLeft, bool roundTopRight,
|
||||||
bool roundBottomLeft, bool roundBottomRight, Color color) const;
|
bool roundBottomLeft, bool roundBottomRight, Color color) const;
|
||||||
void drawImage(const uint8_t bitmap[], int x, int y, int width, int height) const;
|
void drawImage(const uint8_t bitmap[], int x, int y, int width, int height) const;
|
||||||
void drawIcon(const uint8_t bitmap[], int x, int y, int width, int height) const;
|
void drawIcon(const uint8_t bitmap[], int x, int y, int size) const;
|
||||||
void drawBitmap(const Bitmap& bitmap, int x, int y, int maxWidth, int maxHeight, float cropX = 0,
|
void drawBitmap(const Bitmap& bitmap, int x, int y, int maxWidth, int maxHeight, float cropX = 0,
|
||||||
float cropY = 0) const;
|
float cropY = 0) const;
|
||||||
void drawBitmap1Bit(const Bitmap& bitmap, int x, int y, int maxWidth, int maxHeight) const;
|
void drawBitmap1Bit(const Bitmap& bitmap, int x, int y, int maxWidth, int maxHeight) const;
|
||||||
@@ -225,12 +215,6 @@ class GfxRenderer {
|
|||||||
int getTextAdvanceX(int fontId, const char* text, EpdFontFamily::Style style) const;
|
int getTextAdvanceX(int fontId, const char* text, EpdFontFamily::Style style) const;
|
||||||
int getFontAscenderSize(int fontId) const;
|
int getFontAscenderSize(int fontId) const;
|
||||||
int getLineHeight(int fontId) const;
|
int getLineHeight(int fontId) const;
|
||||||
// Cap height (from the 'H' glyph), the real visible font extent for vertical
|
|
||||||
// alignment that follows the font instead of a guessed ascender fraction.
|
|
||||||
int getFontCapHeight(int fontId) const;
|
|
||||||
// Offset from text top (drawText's y) to the text's optical center; align an
|
|
||||||
// element to a line via centerY = textTop + getTextVisualCenterOffset(fontId).
|
|
||||||
int getTextVisualCenterOffset(int fontId) const;
|
|
||||||
std::string truncatedText(int fontId, const char* text, int maxWidth,
|
std::string truncatedText(int fontId, const char* text, int maxWidth,
|
||||||
EpdFontFamily::Style style = EpdFontFamily::REGULAR) const;
|
EpdFontFamily::Style style = EpdFontFamily::REGULAR) const;
|
||||||
/// Word-wrap \p text into at most \p maxLines lines, each no wider than
|
/// Word-wrap \p text into at most \p maxLines lines, each no wider than
|
||||||
@@ -247,6 +231,18 @@ class GfxRenderer {
|
|||||||
// Grayscale functions
|
// Grayscale functions
|
||||||
void setRenderMode(const RenderMode mode) { this->renderMode = mode; }
|
void setRenderMode(const RenderMode mode) { this->renderMode = mode; }
|
||||||
RenderMode getRenderMode() const { return renderMode; }
|
RenderMode getRenderMode() const { return renderMode; }
|
||||||
|
void setFastAntiAliasing(const bool enabled) { this->fastAntiAliasing = enabled; }
|
||||||
|
bool isFastAntiAliasing() const { return fastAntiAliasing; }
|
||||||
|
// Grayscale preconditioning settle pass (no-op on X4). The rect overload
|
||||||
|
// takes the gray region in LOGICAL screen coordinates and rotates it to the
|
||||||
|
// panel; the no-arg overload settles the full frame. Call after the BW base
|
||||||
|
// frame is displayed and before the grayscale planes are written.
|
||||||
|
void preconditionGrayscale() const;
|
||||||
|
void preconditionGrayscale(int x, int y, int w, int h) const;
|
||||||
|
// Display the framebuffer as the base frame for a grayscale overlay that
|
||||||
|
// follows (X3: OEM differential base waveform; others: plain display with
|
||||||
|
// `fallback`).
|
||||||
|
void displayGrayscaleBase(HalDisplay::RefreshMode fallback = HalDisplay::HALF_REFRESH) const;
|
||||||
void copyGrayscaleLsbBuffers() const;
|
void copyGrayscaleLsbBuffers() const;
|
||||||
void copyGrayscaleMsbBuffers() const;
|
void copyGrayscaleMsbBuffers() const;
|
||||||
void displayGrayBuffer() const;
|
void displayGrayBuffer() const;
|
||||||
|
|||||||
@@ -65,10 +65,11 @@ STR_SLEEP_COVER_MODE: "Рэжым вокладкі сну"
|
|||||||
STR_HIDE_BATTERY: "Схаваць % батарэі"
|
STR_HIDE_BATTERY: "Схаваць % батарэі"
|
||||||
STR_EXTRA_SPACING: "Дадат. інтэрвал абзаца"
|
STR_EXTRA_SPACING: "Дадат. інтэрвал абзаца"
|
||||||
STR_TEXT_AA: "Згладжванне тэксту"
|
STR_TEXT_AA: "Згладжванне тэксту"
|
||||||
|
STR_TEXT_AA_FULL: "Поўнае"
|
||||||
|
STR_TEXT_AA_FAST: "Хуткае"
|
||||||
STR_SHORT_PWR_BTN: "Кароткае націсканне PWR"
|
STR_SHORT_PWR_BTN: "Кароткае націсканне PWR"
|
||||||
STR_ORIENTATION: "Арыентацыя чытання"
|
STR_ORIENTATION: "Арыентацыя чытання"
|
||||||
STR_SIDE_BTN_LAYOUT: "Бакавыя кнопкі"
|
STR_SIDE_BTN_LAYOUT: "Бакавыя кнопкі"
|
||||||
STR_TOUCH_READER_CONTROLS: "Сэнсарнае кіраванне чытаннем"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Арыентаваць пярэднія кнопкі"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Арыентаваць пярэднія кнопкі"
|
||||||
STR_LONG_PRESS_SKIP: "Доўгае націсканне - змена раздзела"
|
STR_LONG_PRESS_SKIP: "Доўгае націсканне - змена раздзела"
|
||||||
STR_FONT_PREVIEW_TEXT: "У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад'есці фаршу з юшкай"
|
STR_FONT_PREVIEW_TEXT: "У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад'есці фаршу з юшкай"
|
||||||
@@ -127,6 +128,7 @@ STR_PAGE_TURN: "Перагортванне"
|
|||||||
STR_PORTRAIT: "Партрэт"
|
STR_PORTRAIT: "Партрэт"
|
||||||
STR_LANDSCAPE_CW: "Ландшафт (CW)"
|
STR_LANDSCAPE_CW: "Ландшафт (CW)"
|
||||||
STR_INVERTED: "Інверсія"
|
STR_INVERTED: "Інверсія"
|
||||||
|
STR_ORIENTATION_INVERTED: "Партрэт 180°"
|
||||||
STR_LANDSCAPE_CCW: "Ландшафт (CCW)"
|
STR_LANDSCAPE_CCW: "Ландшафт (CCW)"
|
||||||
STR_PREV_NEXT: "Назад/Наперад"
|
STR_PREV_NEXT: "Назад/Наперад"
|
||||||
STR_NEXT_PREV: "Наперад/Назад"
|
STR_NEXT_PREV: "Наперад/Назад"
|
||||||
@@ -177,6 +179,9 @@ STR_EXIT: "« Выхад"
|
|||||||
STR_HOME: "« Галоўная"
|
STR_HOME: "« Галоўная"
|
||||||
STR_SELECT: "Абраць"
|
STR_SELECT: "Абраць"
|
||||||
STR_TOGGLE: "Выбар"
|
STR_TOGGLE: "Выбар"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Пераключыць закладку"
|
||||||
|
STR_BOOKMARK_REMOVED: "Закладка выдалена."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Утрымлівайце Адкрыць, каб выдаліць"
|
||||||
STR_CONFIRM: "Пацв."
|
STR_CONFIRM: "Пацв."
|
||||||
STR_CANCEL: "Адмена"
|
STR_CANCEL: "Адмена"
|
||||||
STR_CONNECT: "Падкл."
|
STR_CONNECT: "Падкл."
|
||||||
@@ -233,7 +238,6 @@ STR_CHAPTER_PREFIX: "Раздзел:"
|
|||||||
STR_PAGES_SEPARATOR: "стар. |"
|
STR_PAGES_SEPARATOR: "стар. |"
|
||||||
STR_BOOK_PREFIX: "Кніга:"
|
STR_BOOK_PREFIX: "Кніга:"
|
||||||
STR_CALIBRE_URL_HINT: "Для Calibre дадайце /opds да URL"
|
STR_CALIBRE_URL_HINT: "Для Calibre дадайце /opds да URL"
|
||||||
STR_PERCENT_STEP_HINT: "Улева/Управа: 1% Уверх/Уніз: 10%"
|
|
||||||
STR_SYNCING_TIME: "Сінхранізацыя часу..."
|
STR_SYNCING_TIME: "Сінхранізацыя часу..."
|
||||||
STR_CALC_HASH: "Вылічэнне хэша дакумента..."
|
STR_CALC_HASH: "Вылічэнне хэша дакумента..."
|
||||||
STR_HASH_FAILED: "Не ўдалося вылічыць хэш дакумента"
|
STR_HASH_FAILED: "Не ўдалося вылічыць хэш дакумента"
|
||||||
@@ -293,7 +297,8 @@ STR_NO_FOOTNOTES: "На гэтай старонцы няма зносак"
|
|||||||
STR_LINK: "[спасылка]"
|
STR_LINK: "[спасылка]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u хв"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u хв"
|
||||||
STR_SLEEP_NEVER: "Ніколі"
|
STR_SLEEP_NEVER: "Ніколі"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Улева/Управа: 1 хв Уверх/Уніз: 5 хв"
|
STR_STEP_HINT_FRONT: "Пярэднія кнопкі:"
|
||||||
|
STR_STEP_HINT_SIDE: "Бакавыя кнопкі:"
|
||||||
STR_AUTO_TURN_ENABLED: "Аўтаперагортванне: "
|
STR_AUTO_TURN_ENABLED: "Аўтаперагортванне: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Аўтаперагортванне (старонак за хвіліну)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Аўтаперагортванне (старонак за хвіліну)"
|
||||||
STR_TILT_PAGE_TURN: "Перагортванне нахілам"
|
STR_TILT_PAGE_TURN: "Перагортванне нахілам"
|
||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Mode de pantalla de repòs"
|
|||||||
STR_HIDE_BATTERY: "Oculta el % de bateria"
|
STR_HIDE_BATTERY: "Oculta el % de bateria"
|
||||||
STR_EXTRA_SPACING: "Espaiat de paràgraf extra"
|
STR_EXTRA_SPACING: "Espaiat de paràgraf extra"
|
||||||
STR_TEXT_AA: "Antialiàsing del text"
|
STR_TEXT_AA: "Antialiàsing del text"
|
||||||
|
STR_TEXT_AA_FULL: "Complet"
|
||||||
|
STR_TEXT_AA_FAST: "Ràpid"
|
||||||
STR_IMAGES: "Imatges"
|
STR_IMAGES: "Imatges"
|
||||||
STR_IMAGES_DISPLAY: "Mostrar"
|
STR_IMAGES_DISPLAY: "Mostrar"
|
||||||
STR_IMAGES_PLACEHOLDER: "Text de mostra"
|
STR_IMAGES_PLACEHOLDER: "Text de mostra"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Suprimir"
|
|||||||
STR_SHORT_PWR_BTN: "Clic curt del botó d'engegada"
|
STR_SHORT_PWR_BTN: "Clic curt del botó d'engegada"
|
||||||
STR_ORIENTATION: "Orientació de lectura"
|
STR_ORIENTATION: "Orientació de lectura"
|
||||||
STR_SIDE_BTN_LAYOUT: "Disposició botons laterals"
|
STR_SIDE_BTN_LAYOUT: "Disposició botons laterals"
|
||||||
STR_TOUCH_READER_CONTROLS: "Controls tàctils del lector"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientar botons frontals"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientar botons frontals"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Comportament de prémer llargament el botó"
|
STR_LONG_PRESS_BEHAVIOR: "Comportament de prémer llargament el botó"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Desactivat"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Desactivat"
|
||||||
@@ -137,6 +138,7 @@ STR_PAGE_TURN: "Canvi de pàgina"
|
|||||||
STR_PORTRAIT: "Vertical"
|
STR_PORTRAIT: "Vertical"
|
||||||
STR_LANDSCAPE_CW: "Horitzontal horari"
|
STR_LANDSCAPE_CW: "Horitzontal horari"
|
||||||
STR_INVERTED: "Invertit"
|
STR_INVERTED: "Invertit"
|
||||||
|
STR_ORIENTATION_INVERTED: "Vertical 180°"
|
||||||
STR_LANDSCAPE_CCW: "Horitzontal antihorari"
|
STR_LANDSCAPE_CCW: "Horitzontal antihorari"
|
||||||
STR_PREV_NEXT: "Anterior/Següent"
|
STR_PREV_NEXT: "Anterior/Següent"
|
||||||
STR_NEXT_PREV: "Següent/Anterior"
|
STR_NEXT_PREV: "Següent/Anterior"
|
||||||
@@ -176,8 +178,7 @@ STR_DOWNLOADING: "S'està baixant..."
|
|||||||
STR_DOWNLOAD_FAILED: "Ha fallat la baixada"
|
STR_DOWNLOAD_FAILED: "Ha fallat la baixada"
|
||||||
STR_ERROR_MSG: "Error:"
|
STR_ERROR_MSG: "Error:"
|
||||||
STR_UNNAMED: "Sense nom"
|
STR_UNNAMED: "Sense nom"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Manteniu premut Confirma per esborrar"
|
STR_HOLD_OPEN_TO_DELETE: "Manteniu premut Obre per esborrar"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Manteniu premut Confirma al lector per crear un punt de llibre."
|
|
||||||
STR_NO_SERVER_URL: "No s'ha configurat cap URL de servidor"
|
STR_NO_SERVER_URL: "No s'ha configurat cap URL de servidor"
|
||||||
STR_FETCH_FEED_FAILED: "Ha fallat l'obtenció del feed"
|
STR_FETCH_FEED_FAILED: "Ha fallat l'obtenció del feed"
|
||||||
STR_PARSE_FEED_FAILED: "Ha fallat l'anàlisi del feed"
|
STR_PARSE_FEED_FAILED: "Ha fallat l'anàlisi del feed"
|
||||||
@@ -193,6 +194,7 @@ STR_HOME: "« Inici"
|
|||||||
STR_SELECT: "Selecciona"
|
STR_SELECT: "Selecciona"
|
||||||
STR_SELECTED: "Seleccionat"
|
STR_SELECTED: "Seleccionat"
|
||||||
STR_TOGGLE: "Canvia"
|
STR_TOGGLE: "Canvia"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Commuta punt de llibre"
|
||||||
STR_CONFIRM: "Confirma"
|
STR_CONFIRM: "Confirma"
|
||||||
STR_CANCEL: "Cancel·la"
|
STR_CANCEL: "Cancel·la"
|
||||||
STR_CONNECT: "Connecta"
|
STR_CONNECT: "Connecta"
|
||||||
@@ -237,6 +239,7 @@ STR_QUICK_RESUME_TIMEOUT: "Represa ràpida després del temps"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Reassigna els botons frontals"
|
STR_REMAP_FRONT_BUTTONS: "Reassigna els botons frontals"
|
||||||
STR_BOOKMARKS: "Punts de llibre"
|
STR_BOOKMARKS: "Punts de llibre"
|
||||||
STR_BOOKMARK_ADDED: "S'ha afegit el punt de llibre."
|
STR_BOOKMARK_ADDED: "S'ha afegit el punt de llibre."
|
||||||
|
STR_BOOKMARK_REMOVED: "S'ha eliminat el punt de llibre."
|
||||||
STR_OPDS_BROWSER: "Navegador OPDS"
|
STR_OPDS_BROWSER: "Navegador OPDS"
|
||||||
STR_COVER_CUSTOM: "Portada + Personalitzat"
|
STR_COVER_CUSTOM: "Portada + Personalitzat"
|
||||||
STR_QUICK_RESUME: "Represa ràpida"
|
STR_QUICK_RESUME: "Represa ràpida"
|
||||||
@@ -271,7 +274,6 @@ STR_CHAPTER_PREFIX: "Capítol: "
|
|||||||
STR_PAGES_SEPARATOR: " pàgines | "
|
STR_PAGES_SEPARATOR: " pàgines | "
|
||||||
STR_BOOK_PREFIX: "Llibre: "
|
STR_BOOK_PREFIX: "Llibre: "
|
||||||
STR_CALIBRE_URL_HINT: "Per al Calibre, afegiu /opds a la URL"
|
STR_CALIBRE_URL_HINT: "Per al Calibre, afegiu /opds a la URL"
|
||||||
STR_PERCENT_STEP_HINT: "Esquerra/Dreta: 1% Amunt/Avall: 10%"
|
|
||||||
STR_SYNCING_TIME: "S'està sincronitzant el temps..."
|
STR_SYNCING_TIME: "S'està sincronitzant el temps..."
|
||||||
STR_CALC_HASH: "S'està calculant el hash del document..."
|
STR_CALC_HASH: "S'està calculant el hash del document..."
|
||||||
STR_HASH_FAILED: "No s'ha pogut calcular el hash del document"
|
STR_HASH_FAILED: "No s'ha pogut calcular el hash del document"
|
||||||
@@ -304,7 +306,8 @@ STR_NO_FOOTNOTES: "No hi ha notes al peu en aquesta pàgina"
|
|||||||
STR_LINK: "[enllaç]"
|
STR_LINK: "[enllaç]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Mai"
|
STR_SLEEP_NEVER: "Mai"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Esquerra/Dreta: 1 min Amunt/Avall: 5 min"
|
STR_STEP_HINT_FRONT: "Botons frontals:"
|
||||||
|
STR_STEP_HINT_SIDE: "Botons laterals:"
|
||||||
STR_SCREENSHOT_BUTTON: "Fes una captura de pantalla"
|
STR_SCREENSHOT_BUTTON: "Fes una captura de pantalla"
|
||||||
STR_AUTO_TURN_ENABLED: "Passar automàtic activat: "
|
STR_AUTO_TURN_ENABLED: "Passar automàtic activat: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Passar automàtic (pàgines per minut)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Passar automàtic (pàgines per minut)"
|
||||||
|
|||||||
@@ -58,17 +58,18 @@ STR_CALIBRE_INSTRUCTION_3: "3) V Calibre: „Odeslat do zařízení“"
|
|||||||
STR_CALIBRE_INSTRUCTION_4: "„Při odesílání ponechat tuto obrazovku otevřenou“"
|
STR_CALIBRE_INSTRUCTION_4: "„Při odesílání ponechat tuto obrazovku otevřenou“"
|
||||||
STR_CAT_DISPLAY: "Displej"
|
STR_CAT_DISPLAY: "Displej"
|
||||||
STR_CAT_READER: "Čtečka"
|
STR_CAT_READER: "Čtečka"
|
||||||
STR_CAT_CONTROLS: "Ovládací prvky"
|
STR_CAT_CONTROLS: "Ovládání"
|
||||||
STR_CAT_SYSTEM: "Systém"
|
STR_CAT_SYSTEM: "Systém"
|
||||||
STR_SLEEP_SCREEN: "Obrazovka spánku"
|
STR_SLEEP_SCREEN: "Obrazovka spánku"
|
||||||
STR_SLEEP_COVER_MODE: "Obrazovka spánku Režim krytu"
|
STR_SLEEP_COVER_MODE: "Obrazovka spánku Režim krytu"
|
||||||
STR_HIDE_BATTERY: "Skrýt baterii %"
|
STR_HIDE_BATTERY: "Skrýt baterii %"
|
||||||
STR_EXTRA_SPACING: "Extra mezery mezi odstavci"
|
STR_EXTRA_SPACING: "Extra mezery mezi odstavci"
|
||||||
STR_TEXT_AA: "Vyhlazování textu"
|
STR_TEXT_AA: "Vyhlazování textu"
|
||||||
|
STR_TEXT_AA_FULL: "Plné"
|
||||||
|
STR_TEXT_AA_FAST: "Rychlé"
|
||||||
STR_SHORT_PWR_BTN: "Krátké stisknutí tlačítka napájení"
|
STR_SHORT_PWR_BTN: "Krátké stisknutí tlačítka napájení"
|
||||||
STR_ORIENTATION: "Orientace čtení"
|
STR_ORIENTATION: "Orientace čtení"
|
||||||
STR_SIDE_BTN_LAYOUT: "Rozvržení bočních tlačítek (čtečka)"
|
STR_SIDE_BTN_LAYOUT: "Rozvržení bočních tlačítek (čtečka)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Dotykové ovládání čtečky"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientovat přední tlačítka"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientovat přední tlačítka"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Chování při dlouhém stisknutí tlačítka"
|
STR_LONG_PRESS_BEHAVIOR: "Chování při dlouhém stisknutí tlačítka"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "VYP"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "VYP"
|
||||||
@@ -132,6 +133,7 @@ STR_PAGE_TURN: "Otáčení stránek"
|
|||||||
STR_PORTRAIT: "Na výšku"
|
STR_PORTRAIT: "Na výšku"
|
||||||
STR_LANDSCAPE_CW: "Na šířku po směru hod. ručiček"
|
STR_LANDSCAPE_CW: "Na šířku po směru hod. ručiček"
|
||||||
STR_INVERTED: "Invertovaný"
|
STR_INVERTED: "Invertovaný"
|
||||||
|
STR_ORIENTATION_INVERTED: "Na výšku 180°"
|
||||||
STR_LANDSCAPE_CCW: "Na šířku proti směru hod. ručiček"
|
STR_LANDSCAPE_CCW: "Na šířku proti směru hod. ručiček"
|
||||||
STR_PREV_NEXT: "Předchozí/Další"
|
STR_PREV_NEXT: "Předchozí/Další"
|
||||||
STR_NEXT_PREV: "Další/Předchozí"
|
STR_NEXT_PREV: "Další/Předchozí"
|
||||||
@@ -182,6 +184,9 @@ STR_EXIT: "« Konec"
|
|||||||
STR_HOME: "« Domů"
|
STR_HOME: "« Domů"
|
||||||
STR_SELECT: "Vybrat"
|
STR_SELECT: "Vybrat"
|
||||||
STR_TOGGLE: "Přepnout"
|
STR_TOGGLE: "Přepnout"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Přepnout záložku"
|
||||||
|
STR_BOOKMARK_REMOVED: "Záložka odstraněna."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Podržte Otevřít pro smazání"
|
||||||
STR_CONFIRM: "Potvrdit"
|
STR_CONFIRM: "Potvrdit"
|
||||||
STR_CANCEL: "Zrušit"
|
STR_CANCEL: "Zrušit"
|
||||||
STR_CONNECT: "Připojit"
|
STR_CONNECT: "Připojit"
|
||||||
@@ -240,7 +245,6 @@ STR_CHAPTER_PREFIX: "Kapitola:"
|
|||||||
STR_PAGES_SEPARATOR: "stránek |"
|
STR_PAGES_SEPARATOR: "stránek |"
|
||||||
STR_BOOK_PREFIX: "Kniha:"
|
STR_BOOK_PREFIX: "Kniha:"
|
||||||
STR_CALIBRE_URL_HINT: "Pro Calibre přidejte /opds do URL adresy"
|
STR_CALIBRE_URL_HINT: "Pro Calibre přidejte /opds do URL adresy"
|
||||||
STR_PERCENT_STEP_HINT: "Vlevo/Vpravo: 1 % Nahoru/Dolů: 10 %"
|
|
||||||
STR_SYNCING_TIME: "Čas synchronizace..."
|
STR_SYNCING_TIME: "Čas synchronizace..."
|
||||||
STR_CALC_HASH: "Výpočet hashe dokumentu..."
|
STR_CALC_HASH: "Výpočet hashe dokumentu..."
|
||||||
STR_HASH_FAILED: "Nepodařilo se vypočítat hash dokumentu"
|
STR_HASH_FAILED: "Nepodařilo se vypočítat hash dokumentu"
|
||||||
@@ -270,5 +274,6 @@ STR_OPDS_SERVER_URL: "URL serveru OPDS"
|
|||||||
STR_SCREENSHOT_BUTTON: "Udělat snímek obrazovky"
|
STR_SCREENSHOT_BUTTON: "Udělat snímek obrazovky"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Nikdy"
|
STR_SLEEP_NEVER: "Nikdy"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Vlevo/Vpravo: 1 min Nahoru/Dolů: 5 min"
|
STR_STEP_HINT_FRONT: "Přední tlačítka:"
|
||||||
|
STR_STEP_HINT_SIDE: "Boční tlačítka:"
|
||||||
STR_TILT_PAGE_TURN: "Otáčení stránek nakloněním"
|
STR_TILT_PAGE_TURN: "Otáčení stránek nakloněním"
|
||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Hvile-skærm omslag-tilstand"
|
|||||||
STR_HIDE_BATTERY: "Skjul batteri %"
|
STR_HIDE_BATTERY: "Skjul batteri %"
|
||||||
STR_EXTRA_SPACING: "Ekstra afsnitsafstand"
|
STR_EXTRA_SPACING: "Ekstra afsnitsafstand"
|
||||||
STR_TEXT_AA: "Tekst Anti-Aliasing"
|
STR_TEXT_AA: "Tekst Anti-Aliasing"
|
||||||
|
STR_TEXT_AA_FULL: "Fuld"
|
||||||
|
STR_TEXT_AA_FAST: "Hurtig"
|
||||||
STR_IMAGES: "Billeder"
|
STR_IMAGES: "Billeder"
|
||||||
STR_IMAGES_DISPLAY: "Vis"
|
STR_IMAGES_DISPLAY: "Vis"
|
||||||
STR_IMAGES_PLACEHOLDER: "Pladsholder"
|
STR_IMAGES_PLACEHOLDER: "Pladsholder"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Skjul"
|
|||||||
STR_SHORT_PWR_BTN: "Kort tryk på tænd/sluk-knap"
|
STR_SHORT_PWR_BTN: "Kort tryk på tænd/sluk-knap"
|
||||||
STR_ORIENTATION: "Læseretning"
|
STR_ORIENTATION: "Læseretning"
|
||||||
STR_SIDE_BTN_LAYOUT: "Knaplayout på siden (læser)"
|
STR_SIDE_BTN_LAYOUT: "Knaplayout på siden (læser)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Touch-betjening (læser)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientér forreste knapper"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientér forreste knapper"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Comportamiento al mantener pulsado el botón"
|
STR_LONG_PRESS_BEHAVIOR: "Comportamiento al mantener pulsado el botón"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Desactivado"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Desactivado"
|
||||||
@@ -137,6 +138,7 @@ STR_PAGE_TURN: "Sideskift"
|
|||||||
STR_PORTRAIT: "Portræt"
|
STR_PORTRAIT: "Portræt"
|
||||||
STR_LANDSCAPE_CW: "Liggende med uret"
|
STR_LANDSCAPE_CW: "Liggende med uret"
|
||||||
STR_INVERTED: "Inverteret"
|
STR_INVERTED: "Inverteret"
|
||||||
|
STR_ORIENTATION_INVERTED: "Portræt 180°"
|
||||||
STR_LANDSCAPE_CCW: "Liggende mod uret"
|
STR_LANDSCAPE_CCW: "Liggende mod uret"
|
||||||
STR_PREV_NEXT: "Forrige/Næste"
|
STR_PREV_NEXT: "Forrige/Næste"
|
||||||
STR_NEXT_PREV: "Næste/Forrige"
|
STR_NEXT_PREV: "Næste/Forrige"
|
||||||
@@ -188,6 +190,9 @@ STR_HOME: "« Hjem"
|
|||||||
STR_SELECT: "Vælg"
|
STR_SELECT: "Vælg"
|
||||||
STR_SELECTED: "Valgt"
|
STR_SELECTED: "Valgt"
|
||||||
STR_TOGGLE: "Skift"
|
STR_TOGGLE: "Skift"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Skift bogmærke"
|
||||||
|
STR_BOOKMARK_REMOVED: "Bogmærke fjernet."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Hold Åbn nede for at slette"
|
||||||
STR_CONFIRM: "Bekræft"
|
STR_CONFIRM: "Bekræft"
|
||||||
STR_CANCEL: "Annuller"
|
STR_CANCEL: "Annuller"
|
||||||
STR_CONNECT: "Forbind"
|
STR_CONNECT: "Forbind"
|
||||||
@@ -263,7 +268,6 @@ STR_CHAPTER_PREFIX: "Kapitel: "
|
|||||||
STR_PAGES_SEPARATOR: " sider | "
|
STR_PAGES_SEPARATOR: " sider | "
|
||||||
STR_BOOK_PREFIX: "Bog: "
|
STR_BOOK_PREFIX: "Bog: "
|
||||||
STR_CALIBRE_URL_HINT: "Tilføj /opds til din URL for Calibre"
|
STR_CALIBRE_URL_HINT: "Tilføj /opds til din URL for Calibre"
|
||||||
STR_PERCENT_STEP_HINT: "Venstre/Højre: 1% Op/Ned: 10%"
|
|
||||||
STR_SYNCING_TIME: "Synkroniserer tid..."
|
STR_SYNCING_TIME: "Synkroniserer tid..."
|
||||||
STR_CALC_HASH: "Beregner dokument-hash..."
|
STR_CALC_HASH: "Beregner dokument-hash..."
|
||||||
STR_HASH_FAILED: "Kunne ikke beregne dokument-hash"
|
STR_HASH_FAILED: "Kunne ikke beregne dokument-hash"
|
||||||
@@ -295,7 +299,8 @@ STR_NO_FOOTNOTES: "Ingen fodnoter på denne side"
|
|||||||
STR_LINK: "[link]"
|
STR_LINK: "[link]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Aldrig"
|
STR_SLEEP_NEVER: "Aldrig"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Venstre/Højre: 1 min Op/Ned: 5 min"
|
STR_STEP_HINT_FRONT: "Frontknapper:"
|
||||||
|
STR_STEP_HINT_SIDE: "Sideknapper:"
|
||||||
STR_SCREENSHOT_BUTTON: "Tag skærmbillede"
|
STR_SCREENSHOT_BUTTON: "Tag skærmbillede"
|
||||||
STR_AUTO_TURN_ENABLED: "Automatisk sidevendning aktiveret: "
|
STR_AUTO_TURN_ENABLED: "Automatisk sidevendning aktiveret: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Automatisk vending (sider per minut)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Automatisk vending (sider per minut)"
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Slaapscherm omslag-modus"
|
|||||||
STR_HIDE_BATTERY: "Batterij % verbergen"
|
STR_HIDE_BATTERY: "Batterij % verbergen"
|
||||||
STR_EXTRA_SPACING: "Extra regelafstand alinea"
|
STR_EXTRA_SPACING: "Extra regelafstand alinea"
|
||||||
STR_TEXT_AA: "Tekst Anti-Aliasing"
|
STR_TEXT_AA: "Tekst Anti-Aliasing"
|
||||||
|
STR_TEXT_AA_FULL: "Volledig"
|
||||||
|
STR_TEXT_AA_FAST: "Snel"
|
||||||
STR_IMAGES: "Afbeeldingen"
|
STR_IMAGES: "Afbeeldingen"
|
||||||
STR_IMAGES_DISPLAY: "Weergave"
|
STR_IMAGES_DISPLAY: "Weergave"
|
||||||
STR_IMAGES_PLACEHOLDER: "Placeholder"
|
STR_IMAGES_PLACEHOLDER: "Placeholder"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Verbergen"
|
|||||||
STR_SHORT_PWR_BTN: "Korte klik aan/uit-knop"
|
STR_SHORT_PWR_BTN: "Korte klik aan/uit-knop"
|
||||||
STR_ORIENTATION: "Leesstand"
|
STR_ORIENTATION: "Leesstand"
|
||||||
STR_SIDE_BTN_LAYOUT: "Indeling zijknoppen (lezer)"
|
STR_SIDE_BTN_LAYOUT: "Indeling zijknoppen (lezer)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Aanraakbediening lezer"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Richt voorste knoppen"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Richt voorste knoppen"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Long-press button behavior"
|
STR_LONG_PRESS_BEHAVIOR: "Long-press button behavior"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
||||||
@@ -136,7 +137,8 @@ STR_SLEEP: "Slaap"
|
|||||||
STR_PAGE_TURN: "Pagina omslaan"
|
STR_PAGE_TURN: "Pagina omslaan"
|
||||||
STR_PORTRAIT: "Staand"
|
STR_PORTRAIT: "Staand"
|
||||||
STR_LANDSCAPE_CW: "Liggend (rechtsom)"
|
STR_LANDSCAPE_CW: "Liggend (rechtsom)"
|
||||||
STR_INVERTED: "Omgekeerd"
|
STR_INVERTED: "Geïnverteerd"
|
||||||
|
STR_ORIENTATION_INVERTED: "Staand 180°"
|
||||||
STR_LANDSCAPE_CCW: "Liggend (linksom)"
|
STR_LANDSCAPE_CCW: "Liggend (linksom)"
|
||||||
STR_PREV_NEXT: "Vorige/Volgende"
|
STR_PREV_NEXT: "Vorige/Volgende"
|
||||||
STR_NEXT_PREV: "Volgende/Vorige"
|
STR_NEXT_PREV: "Volgende/Vorige"
|
||||||
@@ -188,6 +190,9 @@ STR_HOME: "« Home"
|
|||||||
STR_SELECT: "Kies"
|
STR_SELECT: "Kies"
|
||||||
STR_SELECTED: "Geselecteerd"
|
STR_SELECTED: "Geselecteerd"
|
||||||
STR_TOGGLE: "Wissel"
|
STR_TOGGLE: "Wissel"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Bladwijzer wisselen"
|
||||||
|
STR_BOOKMARK_REMOVED: "Bladwijzer verwijderd."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Houd Openen ingedrukt om te verwijderen"
|
||||||
STR_CONFIRM: "Bevestig"
|
STR_CONFIRM: "Bevestig"
|
||||||
STR_CANCEL: "Annuleer"
|
STR_CANCEL: "Annuleer"
|
||||||
STR_CONNECT: "Verbind"
|
STR_CONNECT: "Verbind"
|
||||||
@@ -263,7 +268,6 @@ STR_CHAPTER_PREFIX: "Hoofdstuk: "
|
|||||||
STR_PAGES_SEPARATOR: " pagina's | "
|
STR_PAGES_SEPARATOR: " pagina's | "
|
||||||
STR_BOOK_PREFIX: "Boek: "
|
STR_BOOK_PREFIX: "Boek: "
|
||||||
STR_CALIBRE_URL_HINT: "Voeg voor Calibre /opds toe aan de URL"
|
STR_CALIBRE_URL_HINT: "Voeg voor Calibre /opds toe aan de URL"
|
||||||
STR_PERCENT_STEP_HINT: "Links/Rechts: 1% Omhoog/Omlaag: 10%"
|
|
||||||
STR_SYNCING_TIME: "Tijd synchroniseren..."
|
STR_SYNCING_TIME: "Tijd synchroniseren..."
|
||||||
STR_CALC_HASH: "Document-hash berekenen..."
|
STR_CALC_HASH: "Document-hash berekenen..."
|
||||||
STR_HASH_FAILED: "Document-hash berekenen mislukt"
|
STR_HASH_FAILED: "Document-hash berekenen mislukt"
|
||||||
@@ -295,7 +299,8 @@ STR_NO_FOOTNOTES: "Geen voetnoten op deze pagina"
|
|||||||
STR_LINK: "[link]"
|
STR_LINK: "[link]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Nooit"
|
STR_SLEEP_NEVER: "Nooit"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Links/Rechts: 1 min Omhoog/Omlaag: 5 min"
|
STR_STEP_HINT_FRONT: "Voorknoppen:"
|
||||||
|
STR_STEP_HINT_SIDE: "Zijknoppen:"
|
||||||
STR_SCREENSHOT_BUTTON: "Screenshot maken"
|
STR_SCREENSHOT_BUTTON: "Screenshot maken"
|
||||||
STR_AUTO_TURN_ENABLED: "Automatisch omslaan ingeschakeld: "
|
STR_AUTO_TURN_ENABLED: "Automatisch omslaan ingeschakeld: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Autom. omslaan (pagina's per minuut)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Autom. omslaan (pagina's per minuut)"
|
||||||
|
|||||||
@@ -66,14 +66,17 @@ STR_SLEEP_COVER_MODE: "Sleep Screen Cover Mode"
|
|||||||
STR_HIDE_BATTERY: "Hide Battery %"
|
STR_HIDE_BATTERY: "Hide Battery %"
|
||||||
STR_EXTRA_SPACING: "Extra Paragraph Spacing"
|
STR_EXTRA_SPACING: "Extra Paragraph Spacing"
|
||||||
STR_TEXT_AA: "Text Anti-Aliasing"
|
STR_TEXT_AA: "Text Anti-Aliasing"
|
||||||
|
STR_TEXT_AA_FULL: "Full"
|
||||||
|
STR_TEXT_AA_FAST: "Fast"
|
||||||
STR_IMAGES: "Images"
|
STR_IMAGES: "Images"
|
||||||
STR_IMAGES_DISPLAY: "Display"
|
STR_IMAGES_DISPLAY: "Display"
|
||||||
STR_IMAGES_PLACEHOLDER: "Placeholder"
|
STR_IMAGES_PLACEHOLDER: "Placeholder"
|
||||||
STR_IMAGES_SUPPRESS: "Suppress"
|
STR_IMAGES_SUPPRESS: "Suppress"
|
||||||
|
STR_EOB_HOME: "Home"
|
||||||
|
STR_EOB_CONTINUE_WITH: "Continue with"
|
||||||
STR_SHORT_PWR_BTN: "Short Power Button Click"
|
STR_SHORT_PWR_BTN: "Short Power Button Click"
|
||||||
STR_ORIENTATION: "Reading Orientation"
|
STR_ORIENTATION: "Reading Orientation"
|
||||||
STR_SIDE_BTN_LAYOUT: "Side Button Layout (reader)"
|
STR_SIDE_BTN_LAYOUT: "Side Button Layout (reader)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Touch Reader Controls"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orient front buttons"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orient front buttons"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Long-press button behavior"
|
STR_LONG_PRESS_BEHAVIOR: "Long-press button behavior"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
||||||
@@ -140,6 +143,7 @@ STR_FORCE_REFRESH: "Refresh Screen"
|
|||||||
STR_PORTRAIT: "Portrait"
|
STR_PORTRAIT: "Portrait"
|
||||||
STR_LANDSCAPE_CW: "Landscape CW"
|
STR_LANDSCAPE_CW: "Landscape CW"
|
||||||
STR_INVERTED: "Inverted"
|
STR_INVERTED: "Inverted"
|
||||||
|
STR_ORIENTATION_INVERTED: "Portrait 180°"
|
||||||
STR_LANDSCAPE_CCW: "Landscape CCW"
|
STR_LANDSCAPE_CCW: "Landscape CCW"
|
||||||
STR_PREV_NEXT: "Prev/Next"
|
STR_PREV_NEXT: "Prev/Next"
|
||||||
STR_NEXT_PREV: "Next/Prev"
|
STR_NEXT_PREV: "Next/Prev"
|
||||||
@@ -180,8 +184,7 @@ STR_DOWNLOADING: "Downloading..."
|
|||||||
STR_DOWNLOAD_FAILED: "Download failed"
|
STR_DOWNLOAD_FAILED: "Download failed"
|
||||||
STR_ERROR_MSG: "Error:"
|
STR_ERROR_MSG: "Error:"
|
||||||
STR_UNNAMED: "Unnamed"
|
STR_UNNAMED: "Unnamed"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Hold Confirm to Delete"
|
STR_HOLD_OPEN_TO_DELETE: "Hold Open to Delete"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Hold Confirm from the reader to create a bookmark."
|
|
||||||
STR_NO_SERVER_URL: "No server URL configured"
|
STR_NO_SERVER_URL: "No server URL configured"
|
||||||
STR_FETCH_FEED_FAILED: "Failed to fetch feed"
|
STR_FETCH_FEED_FAILED: "Failed to fetch feed"
|
||||||
STR_PARSE_FEED_FAILED: "Failed to parse feed"
|
STR_PARSE_FEED_FAILED: "Failed to parse feed"
|
||||||
@@ -199,6 +202,7 @@ STR_HOME: "« Home"
|
|||||||
STR_SELECT: "Select"
|
STR_SELECT: "Select"
|
||||||
STR_SELECTED: "Selected"
|
STR_SELECTED: "Selected"
|
||||||
STR_TOGGLE: "Toggle"
|
STR_TOGGLE: "Toggle"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Toggle Bookmark"
|
||||||
STR_CONFIRM: "Confirm"
|
STR_CONFIRM: "Confirm"
|
||||||
STR_CANCEL: "Cancel"
|
STR_CANCEL: "Cancel"
|
||||||
STR_CONNECT: "Connect"
|
STR_CONNECT: "Connect"
|
||||||
@@ -261,6 +265,7 @@ STR_SUNLIGHT_FADING_FIX: "Sunlight Fading Fix"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Remap Front Buttons"
|
STR_REMAP_FRONT_BUTTONS: "Remap Front Buttons"
|
||||||
STR_BOOKMARKS: "Bookmarks"
|
STR_BOOKMARKS: "Bookmarks"
|
||||||
STR_BOOKMARK_ADDED: "Bookmark added."
|
STR_BOOKMARK_ADDED: "Bookmark added."
|
||||||
|
STR_BOOKMARK_REMOVED: "Bookmark removed."
|
||||||
STR_OPDS_BROWSER: "OPDS Browser"
|
STR_OPDS_BROWSER: "OPDS Browser"
|
||||||
STR_SEARCH: "Search"
|
STR_SEARCH: "Search"
|
||||||
STR_COVER_CUSTOM: "Cover + Custom"
|
STR_COVER_CUSTOM: "Cover + Custom"
|
||||||
@@ -296,7 +301,6 @@ STR_CHAPTER_PREFIX: "Chapter: "
|
|||||||
STR_PAGES_SEPARATOR: " pages | "
|
STR_PAGES_SEPARATOR: " pages | "
|
||||||
STR_BOOK_PREFIX: "Book: "
|
STR_BOOK_PREFIX: "Book: "
|
||||||
STR_CALIBRE_URL_HINT: "For Calibre, add /opds to your URL"
|
STR_CALIBRE_URL_HINT: "For Calibre, add /opds to your URL"
|
||||||
STR_PERCENT_STEP_HINT: "Left/Right: 1% Up/Down: 10%"
|
|
||||||
STR_SYNCING_TIME: "Syncing time..."
|
STR_SYNCING_TIME: "Syncing time..."
|
||||||
STR_CALC_HASH: "Calculating document hash..."
|
STR_CALC_HASH: "Calculating document hash..."
|
||||||
STR_HASH_FAILED: "Failed to calculate document hash"
|
STR_HASH_FAILED: "Failed to calculate document hash"
|
||||||
@@ -331,7 +335,8 @@ STR_LINK: "[link]"
|
|||||||
STR_SCREENSHOT_BUTTON: "Take screenshot"
|
STR_SCREENSHOT_BUTTON: "Take screenshot"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Never"
|
STR_SLEEP_NEVER: "Never"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Left/Right: 1 min Up/Down: 5 min"
|
STR_STEP_HINT_FRONT: "Front buttons:"
|
||||||
|
STR_STEP_HINT_SIDE: "Side buttons:"
|
||||||
STR_ADD_SERVER: "Add Server"
|
STR_ADD_SERVER: "Add Server"
|
||||||
STR_SERVER_NAME: "Server Name"
|
STR_SERVER_NAME: "Server Name"
|
||||||
STR_NO_SERVERS: "No OPDS servers configured"
|
STR_NO_SERVERS: "No OPDS servers configured"
|
||||||
|
|||||||
@@ -65,10 +65,11 @@ STR_SLEEP_COVER_MODE: "Lepotilanäytön kansitila"
|
|||||||
STR_HIDE_BATTERY: "Piilota akun %"
|
STR_HIDE_BATTERY: "Piilota akun %"
|
||||||
STR_EXTRA_SPACING: "Kappaleiden lisäväli"
|
STR_EXTRA_SPACING: "Kappaleiden lisäväli"
|
||||||
STR_TEXT_AA: "Tekstin reunanpehmennys"
|
STR_TEXT_AA: "Tekstin reunanpehmennys"
|
||||||
|
STR_TEXT_AA_FULL: "Täysi"
|
||||||
|
STR_TEXT_AA_FAST: "Nopea"
|
||||||
STR_SHORT_PWR_BTN: "Lyhyt virtapainikkeen painallus"
|
STR_SHORT_PWR_BTN: "Lyhyt virtapainikkeen painallus"
|
||||||
STR_ORIENTATION: "Lukusuunta"
|
STR_ORIENTATION: "Lukusuunta"
|
||||||
STR_SIDE_BTN_LAYOUT: "Sivupainikkeiden asettelu (lukija)"
|
STR_SIDE_BTN_LAYOUT: "Sivupainikkeiden asettelu (lukija)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Kosketusohjaus (lukija)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Suuntaa etupainikkeet"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Suuntaa etupainikkeet"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Long-press button behavior"
|
STR_LONG_PRESS_BEHAVIOR: "Long-press button behavior"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
||||||
@@ -131,7 +132,8 @@ STR_SLEEP: "Lepotila"
|
|||||||
STR_PAGE_TURN: "Sivunkääntö"
|
STR_PAGE_TURN: "Sivunkääntö"
|
||||||
STR_PORTRAIT: "Pysty"
|
STR_PORTRAIT: "Pysty"
|
||||||
STR_LANDSCAPE_CW: "Vaaka myötäpäivään"
|
STR_LANDSCAPE_CW: "Vaaka myötäpäivään"
|
||||||
STR_INVERTED: "Käännetty"
|
STR_INVERTED: "Käänteinen"
|
||||||
|
STR_ORIENTATION_INVERTED: "Pysty 180°"
|
||||||
STR_LANDSCAPE_CCW: "Vaaka vastapäivään"
|
STR_LANDSCAPE_CCW: "Vaaka vastapäivään"
|
||||||
STR_PREV_NEXT: "Edell/Seur"
|
STR_PREV_NEXT: "Edell/Seur"
|
||||||
STR_NEXT_PREV: "Seur/Edell"
|
STR_NEXT_PREV: "Seur/Edell"
|
||||||
@@ -182,6 +184,9 @@ STR_EXIT: "« Poistu"
|
|||||||
STR_HOME: "« Koti"
|
STR_HOME: "« Koti"
|
||||||
STR_SELECT: "Valitse"
|
STR_SELECT: "Valitse"
|
||||||
STR_TOGGLE: "Vaihda"
|
STR_TOGGLE: "Vaihda"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Vaihda kirjanmerkki"
|
||||||
|
STR_BOOKMARK_REMOVED: "Kirjanmerkki poistettu."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Pidä Avaa painettuna poistaaksesi"
|
||||||
STR_CONFIRM: "Vahvista"
|
STR_CONFIRM: "Vahvista"
|
||||||
STR_CANCEL: "Peruuta"
|
STR_CANCEL: "Peruuta"
|
||||||
STR_CONNECT: "Yhdistä"
|
STR_CONNECT: "Yhdistä"
|
||||||
@@ -238,7 +243,6 @@ STR_CHAPTER_PREFIX: "Luku: "
|
|||||||
STR_PAGES_SEPARATOR: " sivua | "
|
STR_PAGES_SEPARATOR: " sivua | "
|
||||||
STR_BOOK_PREFIX: "Kirja: "
|
STR_BOOK_PREFIX: "Kirja: "
|
||||||
STR_CALIBRE_URL_HINT: "Calibrelle lisää /opds osoitteeseen"
|
STR_CALIBRE_URL_HINT: "Calibrelle lisää /opds osoitteeseen"
|
||||||
STR_PERCENT_STEP_HINT: "Vasen/Oikea: 1% Ylös/Alas: 10%"
|
|
||||||
STR_SYNCING_TIME: "Synkronoidaan aikaa..."
|
STR_SYNCING_TIME: "Synkronoidaan aikaa..."
|
||||||
STR_CALC_HASH: "Lasketaan dokumentin tarkistussummaa..."
|
STR_CALC_HASH: "Lasketaan dokumentin tarkistussummaa..."
|
||||||
STR_HASH_FAILED: "Dokumentin tiivisteen laskenta epäonnistui"
|
STR_HASH_FAILED: "Dokumentin tiivisteen laskenta epäonnistui"
|
||||||
@@ -268,5 +272,6 @@ STR_OPDS_SERVER_URL: "OPDS-palvelimen osoite"
|
|||||||
STR_SCREENSHOT_BUTTON: "Ota kuvakaappaus"
|
STR_SCREENSHOT_BUTTON: "Ota kuvakaappaus"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Ei koskaan"
|
STR_SLEEP_NEVER: "Ei koskaan"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Vasen/Oikea: 1 min Ylös/Alas: 5 min"
|
STR_STEP_HINT_FRONT: "Etupainikkeet:"
|
||||||
|
STR_STEP_HINT_SIDE: "Sivupainikkeet:"
|
||||||
STR_TILT_PAGE_TURN: "Sivunkääntö kallistamalla"
|
STR_TILT_PAGE_TURN: "Sivunkääntö kallistamalla"
|
||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Mode écran de veille"
|
|||||||
STR_HIDE_BATTERY: "Masquer % batterie"
|
STR_HIDE_BATTERY: "Masquer % batterie"
|
||||||
STR_EXTRA_SPACING: "Espacement paragraphes"
|
STR_EXTRA_SPACING: "Espacement paragraphes"
|
||||||
STR_TEXT_AA: "Lissage du texte"
|
STR_TEXT_AA: "Lissage du texte"
|
||||||
|
STR_TEXT_AA_FULL: "Complet"
|
||||||
|
STR_TEXT_AA_FAST: "Rapide"
|
||||||
STR_IMAGES: "Images"
|
STR_IMAGES: "Images"
|
||||||
STR_IMAGES_DISPLAY: "Affichage"
|
STR_IMAGES_DISPLAY: "Affichage"
|
||||||
STR_IMAGES_PLACEHOLDER: "Espace réservé"
|
STR_IMAGES_PLACEHOLDER: "Espace réservé"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Masquer"
|
|||||||
STR_SHORT_PWR_BTN: "Appui court alim."
|
STR_SHORT_PWR_BTN: "Appui court alim."
|
||||||
STR_ORIENTATION: "Orientation de lecture"
|
STR_ORIENTATION: "Orientation de lecture"
|
||||||
STR_SIDE_BTN_LAYOUT: "Boutons latéraux"
|
STR_SIDE_BTN_LAYOUT: "Boutons latéraux"
|
||||||
STR_TOUCH_READER_CONTROLS: "Commandes tactiles (lecteur)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orienter boutons avant"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orienter boutons avant"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Comportement lors d'un appui long"
|
STR_LONG_PRESS_BEHAVIOR: "Comportement lors d'un appui long"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Désactivé"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Désactivé"
|
||||||
@@ -137,6 +138,7 @@ STR_PAGE_TURN: "Page suivante"
|
|||||||
STR_PORTRAIT: "Portrait"
|
STR_PORTRAIT: "Portrait"
|
||||||
STR_LANDSCAPE_CW: "Paysage"
|
STR_LANDSCAPE_CW: "Paysage"
|
||||||
STR_INVERTED: "Inversé"
|
STR_INVERTED: "Inversé"
|
||||||
|
STR_ORIENTATION_INVERTED: "Portrait 180°"
|
||||||
STR_LANDSCAPE_CCW: "Paysage inversé"
|
STR_LANDSCAPE_CCW: "Paysage inversé"
|
||||||
STR_PREV_NEXT: "Préc/Suiv"
|
STR_PREV_NEXT: "Préc/Suiv"
|
||||||
STR_NEXT_PREV: "Suiv/Préc"
|
STR_NEXT_PREV: "Suiv/Préc"
|
||||||
@@ -188,6 +190,9 @@ STR_HOME: "« Accueil"
|
|||||||
STR_SELECT: "OK"
|
STR_SELECT: "OK"
|
||||||
STR_SELECTED: "Sélectionné"
|
STR_SELECTED: "Sélectionné"
|
||||||
STR_TOGGLE: "Modifier"
|
STR_TOGGLE: "Modifier"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Basculer le marque-page"
|
||||||
|
STR_BOOKMARK_REMOVED: "Marque-page supprimé."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Maintenir Ouvrir pour supprimer"
|
||||||
STR_CONFIRM: "Confirmer"
|
STR_CONFIRM: "Confirmer"
|
||||||
STR_CANCEL: "Annuler"
|
STR_CANCEL: "Annuler"
|
||||||
STR_CONNECT: "Connecter"
|
STR_CONNECT: "Connecter"
|
||||||
@@ -264,7 +269,6 @@ STR_CHAPTER_PREFIX: "Chapitre : "
|
|||||||
STR_PAGES_SEPARATOR: " pages | "
|
STR_PAGES_SEPARATOR: " pages | "
|
||||||
STR_BOOK_PREFIX: "Livre : "
|
STR_BOOK_PREFIX: "Livre : "
|
||||||
STR_CALIBRE_URL_HINT: "Pour Calibre, ajoutez /opds à l’URL"
|
STR_CALIBRE_URL_HINT: "Pour Calibre, ajoutez /opds à l’URL"
|
||||||
STR_PERCENT_STEP_HINT: "Gauche/Droite : 1% Haut/Bas : 10%"
|
|
||||||
STR_SYNCING_TIME: "Synchro de l’heure…"
|
STR_SYNCING_TIME: "Synchro de l’heure…"
|
||||||
STR_CALC_HASH: "Calcul hash doc…"
|
STR_CALC_HASH: "Calcul hash doc…"
|
||||||
STR_HASH_FAILED: "Échec calcul hash"
|
STR_HASH_FAILED: "Échec calcul hash"
|
||||||
@@ -296,7 +300,8 @@ STR_NO_FOOTNOTES: "Aucune note sur cette page"
|
|||||||
STR_LINK: "[lien]"
|
STR_LINK: "[lien]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Jamais"
|
STR_SLEEP_NEVER: "Jamais"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Gauche/Droite : 1 min Haut/Bas : 5 min"
|
STR_STEP_HINT_FRONT: "Boutons avant :"
|
||||||
|
STR_STEP_HINT_SIDE: "Boutons latéraux :"
|
||||||
STR_SCREENSHOT_BUTTON: "Capture d'écran"
|
STR_SCREENSHOT_BUTTON: "Capture d'écran"
|
||||||
STR_AUTO_TURN_ENABLED: "Tourne-page auto : "
|
STR_AUTO_TURN_ENABLED: "Tourne-page auto : "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Tourne-page auto (pages par minute)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Tourne-page auto (pages par minute)"
|
||||||
|
|||||||
@@ -65,13 +65,14 @@ STR_SLEEP_COVER_MODE: "Standby-Bildmodus"
|
|||||||
STR_HIDE_BATTERY: "Batterie % ausblenden"
|
STR_HIDE_BATTERY: "Batterie % ausblenden"
|
||||||
STR_EXTRA_SPACING: "Absatzabstand"
|
STR_EXTRA_SPACING: "Absatzabstand"
|
||||||
STR_TEXT_AA: "Schriftglättung"
|
STR_TEXT_AA: "Schriftglättung"
|
||||||
|
STR_TEXT_AA_FULL: "Voll"
|
||||||
|
STR_TEXT_AA_FAST: "Schnell"
|
||||||
STR_SHORT_PWR_BTN: "An-Taste kurz drücken"
|
STR_SHORT_PWR_BTN: "An-Taste kurz drücken"
|
||||||
STR_ORIENTATION: "Leseausrichtung"
|
STR_ORIENTATION: "Leseausrichtung"
|
||||||
STR_SIDE_BTN_LAYOUT: "Seitliche Tasten (Lesen)"
|
STR_SIDE_BTN_LAYOUT: "Seitliche Tasten (Lesen)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Touch-Steuerung (Lesen)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Vordere Tasten ausrichten"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Vordere Tasten ausrichten"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Verhalten bei langem Tastendruck"
|
STR_LONG_PRESS_BEHAVIOR: "Verhalten bei langem Tastendruck"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "AUS"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Aus"
|
||||||
STR_LONG_PRESS_BEHAVIOR_SKIP: "Kapitel überspringen"
|
STR_LONG_PRESS_BEHAVIOR_SKIP: "Kapitel überspringen"
|
||||||
STR_LONG_PRESS_BEHAVIOR_ORIENTATION: "Ausrichtung ändern"
|
STR_LONG_PRESS_BEHAVIOR_ORIENTATION: "Ausrichtung ändern"
|
||||||
STR_FONT_PREVIEW_TEXT: "Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich"
|
STR_FONT_PREVIEW_TEXT: "Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich"
|
||||||
@@ -80,8 +81,9 @@ STR_FONT_SIZE: "Schriftgröße"
|
|||||||
STR_LINE_SPACING: "Lese-Zeilenabstand"
|
STR_LINE_SPACING: "Lese-Zeilenabstand"
|
||||||
STR_SCREEN_MARGIN: "Lese-Seitenränder"
|
STR_SCREEN_MARGIN: "Lese-Seitenränder"
|
||||||
STR_PARA_ALIGNMENT: "Lese-Absatzausrichtung"
|
STR_PARA_ALIGNMENT: "Lese-Absatzausrichtung"
|
||||||
|
STR_LONG_PRESS_MENU: "Menütaste lang drücken"
|
||||||
STR_HYPHENATION: "Silbentrennung"
|
STR_HYPHENATION: "Silbentrennung"
|
||||||
STR_TIME_TO_SLEEP: "Standby nach"
|
STR_TIME_TO_SLEEP: "Standby-Modus nach"
|
||||||
STR_REFRESH_FREQ: "Anti-Ghosting nach"
|
STR_REFRESH_FREQ: "Anti-Ghosting nach"
|
||||||
STR_KOREADER_SYNC: "KOReader-Synchr."
|
STR_KOREADER_SYNC: "KOReader-Synchr."
|
||||||
STR_CHECK_UPDATES: "Nach Updates suchen"
|
STR_CHECK_UPDATES: "Nach Updates suchen"
|
||||||
@@ -130,7 +132,8 @@ STR_PAGE_TURN: "Umblättern"
|
|||||||
STR_FORCE_REFRESH: "Bildschirm regenerieren"
|
STR_FORCE_REFRESH: "Bildschirm regenerieren"
|
||||||
STR_PORTRAIT: "Hochformat"
|
STR_PORTRAIT: "Hochformat"
|
||||||
STR_LANDSCAPE_CW: "Querformat rechts"
|
STR_LANDSCAPE_CW: "Querformat rechts"
|
||||||
STR_INVERTED: "Hochformat 180°"
|
STR_INVERTED: "Invertiert"
|
||||||
|
STR_ORIENTATION_INVERTED: "Hochformat 180°"
|
||||||
STR_LANDSCAPE_CCW: "Querformat links"
|
STR_LANDSCAPE_CCW: "Querformat links"
|
||||||
STR_PREV_NEXT: "Zurück/Weiter"
|
STR_PREV_NEXT: "Zurück/Weiter"
|
||||||
STR_NEXT_PREV: "Weiter/Zurück"
|
STR_NEXT_PREV: "Weiter/Zurück"
|
||||||
@@ -169,8 +172,7 @@ STR_DOWNLOADING: "Herunterladen…"
|
|||||||
STR_DOWNLOAD_FAILED: "Ladefehler"
|
STR_DOWNLOAD_FAILED: "Ladefehler"
|
||||||
STR_ERROR_MSG: "Fehler:"
|
STR_ERROR_MSG: "Fehler:"
|
||||||
STR_UNNAMED: "Unbenannt"
|
STR_UNNAMED: "Unbenannt"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Halte Bestätigen zum Löschen"
|
STR_HOLD_OPEN_TO_DELETE: "Halte Öffnen zum Löschen"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Halte Bestätigen im Lesemodus um ein Lesezeichen anzulegen."
|
|
||||||
STR_NO_SERVER_URL: "Keine Server-URL konfiguriert"
|
STR_NO_SERVER_URL: "Keine Server-URL konfiguriert"
|
||||||
STR_FETCH_FEED_FAILED: "Feedfehler"
|
STR_FETCH_FEED_FAILED: "Feedfehler"
|
||||||
STR_PARSE_FEED_FAILED: "Feed-Format ungültig"
|
STR_PARSE_FEED_FAILED: "Feed-Format ungültig"
|
||||||
@@ -188,6 +190,7 @@ STR_HOME: "« Start"
|
|||||||
STR_SELECT: "Auswahl"
|
STR_SELECT: "Auswahl"
|
||||||
STR_SELECTED: "Ausgewählt"
|
STR_SELECTED: "Ausgewählt"
|
||||||
STR_TOGGLE: "Ändern"
|
STR_TOGGLE: "Ändern"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Lesezeichen umschalten"
|
||||||
STR_CONFIRM: "Bestätigen"
|
STR_CONFIRM: "Bestätigen"
|
||||||
STR_CANCEL: "Abbrechen"
|
STR_CANCEL: "Abbrechen"
|
||||||
STR_CONNECT: "Verbinden"
|
STR_CONNECT: "Verbinden"
|
||||||
@@ -251,6 +254,7 @@ STR_QUICK_RESUME_TIMEOUT: "Schnelles Fortsetzen nach Timeout"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Vordere Tasten belegen"
|
STR_REMAP_FRONT_BUTTONS: "Vordere Tasten belegen"
|
||||||
STR_BOOKMARKS: "Lesezeichen"
|
STR_BOOKMARKS: "Lesezeichen"
|
||||||
STR_BOOKMARK_ADDED: "Lesezeichen hinzugefügt."
|
STR_BOOKMARK_ADDED: "Lesezeichen hinzugefügt."
|
||||||
|
STR_BOOKMARK_REMOVED: "Lesezeichen entfernt."
|
||||||
STR_SEARCH: "Suche"
|
STR_SEARCH: "Suche"
|
||||||
STR_OPDS_BROWSER: "OPDS-Browser"
|
STR_OPDS_BROWSER: "OPDS-Browser"
|
||||||
STR_COVER_CUSTOM: "Cover + Eigenes"
|
STR_COVER_CUSTOM: "Cover + Eigenes"
|
||||||
@@ -286,7 +290,6 @@ STR_CHAPTER_PREFIX: "Kapitel:"
|
|||||||
STR_PAGES_SEPARATOR: " Seiten | "
|
STR_PAGES_SEPARATOR: " Seiten | "
|
||||||
STR_BOOK_PREFIX: "Buch: "
|
STR_BOOK_PREFIX: "Buch: "
|
||||||
STR_CALIBRE_URL_HINT: "Calibre: URL um /opds ergänzen"
|
STR_CALIBRE_URL_HINT: "Calibre: URL um /opds ergänzen"
|
||||||
STR_PERCENT_STEP_HINT: "links/rechts: 1% hoch/runter: 10%"
|
|
||||||
STR_SYNCING_TIME: "Zeit synchronisieren…"
|
STR_SYNCING_TIME: "Zeit synchronisieren…"
|
||||||
STR_CALC_HASH: "Dokument-Hash berechnen…"
|
STR_CALC_HASH: "Dokument-Hash berechnen…"
|
||||||
STR_HASH_FAILED: "Dokument-Hash fehlgeschlagen"
|
STR_HASH_FAILED: "Dokument-Hash fehlgeschlagen"
|
||||||
@@ -320,7 +323,8 @@ STR_NO_FOOTNOTES: "Keine Fußnoten auf dieser Seite"
|
|||||||
STR_LINK: "[Link]"
|
STR_LINK: "[Link]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u Min."
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u Min."
|
||||||
STR_SLEEP_NEVER: "Nie"
|
STR_SLEEP_NEVER: "Nie"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Links/Rechts: 1 Min. Hoch/Runter: 5 Min."
|
STR_STEP_HINT_FRONT: "Vordere Tasten:"
|
||||||
|
STR_STEP_HINT_SIDE: "Seitentasten:"
|
||||||
STR_ADD_SERVER: "Server hinzufügen"
|
STR_ADD_SERVER: "Server hinzufügen"
|
||||||
STR_SERVER_NAME: "Servername"
|
STR_SERVER_NAME: "Servername"
|
||||||
STR_NO_SERVERS: "Keine OPDS-Server konfiguriert"
|
STR_NO_SERVERS: "Keine OPDS-Server konfiguriert"
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ STR_SLEEP_COVER_MODE: "תצוגת כריכה במצב שינה"
|
|||||||
STR_HIDE_BATTERY: "הסתר אחוזי סוללה"
|
STR_HIDE_BATTERY: "הסתר אחוזי סוללה"
|
||||||
STR_EXTRA_SPACING: "מרווח פסקאות מוגדל"
|
STR_EXTRA_SPACING: "מרווח פסקאות מוגדל"
|
||||||
STR_TEXT_AA: "החלקת קצוות טקסט"
|
STR_TEXT_AA: "החלקת קצוות טקסט"
|
||||||
|
STR_TEXT_AA_FULL: "מלאה"
|
||||||
|
STR_TEXT_AA_FAST: "מהירה"
|
||||||
STR_IMAGES: "תמונות"
|
STR_IMAGES: "תמונות"
|
||||||
STR_IMAGES_DISPLAY: "הצג תמונות"
|
STR_IMAGES_DISPLAY: "הצג תמונות"
|
||||||
STR_IMAGES_PLACEHOLDER: "סמן"
|
STR_IMAGES_PLACEHOLDER: "סמן"
|
||||||
@@ -73,7 +75,6 @@ STR_IMAGES_SUPPRESS: "הסתר תמונות"
|
|||||||
STR_SHORT_PWR_BTN: "לחיצה קצרה על כפתור ההפעלה"
|
STR_SHORT_PWR_BTN: "לחיצה קצרה על כפתור ההפעלה"
|
||||||
STR_ORIENTATION: "כיוון קריאה (מסך)"
|
STR_ORIENTATION: "כיוון קריאה (מסך)"
|
||||||
STR_SIDE_BTN_LAYOUT: "פריסת כפתורי צד (בקריאה)"
|
STR_SIDE_BTN_LAYOUT: "פריסת כפתורי צד (בקריאה)"
|
||||||
STR_TOUCH_READER_CONTROLS: "פקדי מגע בקריאה"
|
|
||||||
STR_LONG_PRESS_BEHAVIOR: "פעולת לחיצה ארוכה"
|
STR_LONG_PRESS_BEHAVIOR: "פעולת לחיצה ארוכה"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "כבוי"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "כבוי"
|
||||||
STR_LONG_PRESS_BEHAVIOR_SKIP: "דלג פרק"
|
STR_LONG_PRESS_BEHAVIOR_SKIP: "דלג פרק"
|
||||||
@@ -135,7 +136,8 @@ STR_PAGE_TURN: "העברת דף"
|
|||||||
STR_FORCE_REFRESH: "רענון מסך מלא"
|
STR_FORCE_REFRESH: "רענון מסך מלא"
|
||||||
STR_PORTRAIT: "לאורך"
|
STR_PORTRAIT: "לאורך"
|
||||||
STR_LANDSCAPE_CW: "לרוחב (ימינה)"
|
STR_LANDSCAPE_CW: "לרוחב (ימינה)"
|
||||||
STR_INVERTED: "הפוך"
|
STR_INVERTED: "היפוך צבעים"
|
||||||
|
STR_ORIENTATION_INVERTED: "לאורך 180°"
|
||||||
STR_LANDSCAPE_CCW: "לרוחב (שמאלה)"
|
STR_LANDSCAPE_CCW: "לרוחב (שמאלה)"
|
||||||
STR_PREV_NEXT: "הקודם/הבא"
|
STR_PREV_NEXT: "הקודם/הבא"
|
||||||
STR_NEXT_PREV: "הבא/הקודם"
|
STR_NEXT_PREV: "הבא/הקודם"
|
||||||
@@ -190,6 +192,7 @@ STR_HOME: "מסך הבית »"
|
|||||||
STR_SELECT: "בחר"
|
STR_SELECT: "בחר"
|
||||||
STR_SELECTED: "נבחר"
|
STR_SELECTED: "נבחר"
|
||||||
STR_TOGGLE: "בחר"
|
STR_TOGGLE: "בחר"
|
||||||
|
STR_TOGGLE_BOOKMARK: "הוסף/הסר סימנייה"
|
||||||
STR_CONFIRM: "אישור"
|
STR_CONFIRM: "אישור"
|
||||||
STR_CANCEL: "ביטול"
|
STR_CANCEL: "ביטול"
|
||||||
STR_CONNECT: "התחבר"
|
STR_CONNECT: "התחבר"
|
||||||
@@ -267,7 +270,6 @@ STR_CHAPTER_PREFIX: "פרק: "
|
|||||||
STR_PAGES_SEPARATOR: " דפים | "
|
STR_PAGES_SEPARATOR: " דפים | "
|
||||||
STR_BOOK_PREFIX: "ספר: "
|
STR_BOOK_PREFIX: "ספר: "
|
||||||
STR_CALIBRE_URL_HINT: "עבור Calibre, הוסף /opds לכתובת ה-URL"
|
STR_CALIBRE_URL_HINT: "עבור Calibre, הוסף /opds לכתובת ה-URL"
|
||||||
STR_PERCENT_STEP_HINT: "שמאל/ימין: 1% למעלה/למטה: 10%"
|
|
||||||
STR_SYNCING_TIME: "מסנכרן שעון..."
|
STR_SYNCING_TIME: "מסנכרן שעון..."
|
||||||
STR_CALC_HASH: "מחשב האש..."
|
STR_CALC_HASH: "מחשב האש..."
|
||||||
STR_HASH_FAILED: "חישוב האש נכשל"
|
STR_HASH_FAILED: "חישוב האש נכשל"
|
||||||
@@ -361,8 +363,7 @@ STR_FRONT_BTN_FOLLOW_ORIENTATION: "התאמת לחצנים קדמיים לכיו
|
|||||||
STR_REMOVE_READ_FROM_RECENTS: "הסר ספרים שנקראו מרשימת האחרונים"
|
STR_REMOVE_READ_FROM_RECENTS: "הסר ספרים שנקראו מרשימת האחרונים"
|
||||||
STR_MOVE_FINISHED_TO_READ: "העבר ספרים שהסתיימו לתיקיית 'נקראו'"
|
STR_MOVE_FINISHED_TO_READ: "העבר ספרים שהסתיימו לתיקיית 'נקראו'"
|
||||||
STR_DISABLED: "מבוטל"
|
STR_DISABLED: "מבוטל"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "החזק לחוץ על אישור כדי למחוק"
|
STR_HOLD_OPEN_TO_DELETE: "לחיצה ארוכה על 'פתח' כדי למחוק"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "החזק לחוץ על כפתור אישור בזמן הקריאה כדי להוסיף סימנייה"
|
|
||||||
STR_CLOCK: "שעון"
|
STR_CLOCK: "שעון"
|
||||||
STR_CLOCK_UTC_OFFSET: "הפרש זמן UTC"
|
STR_CLOCK_UTC_OFFSET: "הפרש זמן UTC"
|
||||||
STR_CLOCK_FORMAT: "תבנית השעון"
|
STR_CLOCK_FORMAT: "תבנית השעון"
|
||||||
@@ -380,6 +381,15 @@ STR_CLOCK_SYNC_NO_WIFI_HINT: "התחבר תחילה לרשת אלחוטית, ו
|
|||||||
STR_CLOCK_SYNCED: "השעון סונכרן"
|
STR_CLOCK_SYNCED: "השעון סונכרן"
|
||||||
STR_BOOKMARKS: "סימניות"
|
STR_BOOKMARKS: "סימניות"
|
||||||
STR_BOOKMARK_ADDED: "הסימנייה התווספה"
|
STR_BOOKMARK_ADDED: "הסימנייה התווספה"
|
||||||
|
STR_BOOKMARK_REMOVED: "הסימנייה הוסרה"
|
||||||
STR_QUICK_RESUME: "חזרה מהירה"
|
STR_QUICK_RESUME: "חזרה מהירה"
|
||||||
STR_REMOVE_FROM_RECENTS: "להסיר מרשימת הספרים האחרונים?"
|
STR_REMOVE_FROM_RECENTS: "להסיר מרשימת הספרים האחרונים?"
|
||||||
STR_CONFIRM_DELETE_BOOKMARK: "למחוק סימנייה זו?"
|
STR_CONFIRM_DELETE_BOOKMARK: "למחוק סימנייה זו?"
|
||||||
|
STR_LONG_PRESS_MENU: "לחיצה ארוכה על אישור"
|
||||||
|
STR_KOSYNC: "KOSync"
|
||||||
|
STR_BOOKMARK_OPTION: "סימנייה"
|
||||||
|
STR_PWR_BTN_FOOTNOTE_BACK: "חזרה מהירה מהערות שוליים"
|
||||||
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u דקות"
|
||||||
|
STR_SLEEP_NEVER: "אף פעם"
|
||||||
|
STR_STEP_HINT_FRONT: "לחצנים קדמיים:"
|
||||||
|
STR_STEP_HINT_SIDE: "לחצני צד:"
|
||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Alvásképernyő borítómód"
|
|||||||
STR_HIDE_BATTERY: "Akkumulátor % elrejtése"
|
STR_HIDE_BATTERY: "Akkumulátor % elrejtése"
|
||||||
STR_EXTRA_SPACING: "Extra bekezdésköz"
|
STR_EXTRA_SPACING: "Extra bekezdésköz"
|
||||||
STR_TEXT_AA: "Szöveg élsimítás"
|
STR_TEXT_AA: "Szöveg élsimítás"
|
||||||
|
STR_TEXT_AA_FULL: "Teljes"
|
||||||
|
STR_TEXT_AA_FAST: "Gyors"
|
||||||
STR_IMAGES: "Képek"
|
STR_IMAGES: "Képek"
|
||||||
STR_IMAGES_DISPLAY: "Megjelenítés"
|
STR_IMAGES_DISPLAY: "Megjelenítés"
|
||||||
STR_IMAGES_PLACEHOLDER: "Helyőrző"
|
STR_IMAGES_PLACEHOLDER: "Helyőrző"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Elnyomás"
|
|||||||
STR_SHORT_PWR_BTN: "Rövid bekapcsológomb nyomás"
|
STR_SHORT_PWR_BTN: "Rövid bekapcsológomb nyomás"
|
||||||
STR_ORIENTATION: "Olvasási irány"
|
STR_ORIENTATION: "Olvasási irány"
|
||||||
STR_SIDE_BTN_LAYOUT: "Oldalsó gomb elrendezés (olvasó)"
|
STR_SIDE_BTN_LAYOUT: "Oldalsó gomb elrendezés (olvasó)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Érintőképernyős vezérlés (olvasó)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Elülső gombok tájolása"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Elülső gombok tájolása"
|
||||||
STR_LONG_PRESS_SKIP: "Hosszú nyomás - fejezet ugrás"
|
STR_LONG_PRESS_SKIP: "Hosszú nyomás - fejezet ugrás"
|
||||||
STR_FONT_PREVIEW_TEXT: "Egy hűtlen vejét fülöncsípő, dühös mexikói úr Wesselényinél mázol Quitóban"
|
STR_FONT_PREVIEW_TEXT: "Egy hűtlen vejét fülöncsípő, dühös mexikói úr Wesselényinél mázol Quitóban"
|
||||||
@@ -133,7 +134,8 @@ STR_SLEEP: "Alvás"
|
|||||||
STR_PAGE_TURN: "Lapozás"
|
STR_PAGE_TURN: "Lapozás"
|
||||||
STR_PORTRAIT: "Álló"
|
STR_PORTRAIT: "Álló"
|
||||||
STR_LANDSCAPE_CW: "Fekvő jobbra"
|
STR_LANDSCAPE_CW: "Fekvő jobbra"
|
||||||
STR_INVERTED: "Fordított"
|
STR_INVERTED: "Invertált"
|
||||||
|
STR_ORIENTATION_INVERTED: "Álló 180°"
|
||||||
STR_LANDSCAPE_CCW: "Fekvő balra"
|
STR_LANDSCAPE_CCW: "Fekvő balra"
|
||||||
STR_PREV_NEXT: "Előző/Következő"
|
STR_PREV_NEXT: "Előző/Következő"
|
||||||
STR_NEXT_PREV: "Következő/Előző"
|
STR_NEXT_PREV: "Következő/Előző"
|
||||||
@@ -185,6 +187,9 @@ STR_HOME: "« Főoldal"
|
|||||||
STR_SELECT: "Kiválasztás"
|
STR_SELECT: "Kiválasztás"
|
||||||
STR_SELECTED: "Kiválasztva"
|
STR_SELECTED: "Kiválasztva"
|
||||||
STR_TOGGLE: "Váltás"
|
STR_TOGGLE: "Váltás"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Könyvjelző váltása"
|
||||||
|
STR_BOOKMARK_REMOVED: "Könyvjelző eltávolítva."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Tartsa lenyomva a Megnyitás gombot a törléshez"
|
||||||
STR_CONFIRM: "Megerősítés"
|
STR_CONFIRM: "Megerősítés"
|
||||||
STR_CANCEL: "Mégse"
|
STR_CANCEL: "Mégse"
|
||||||
STR_CONNECT: "Csatlakozás"
|
STR_CONNECT: "Csatlakozás"
|
||||||
@@ -260,7 +265,6 @@ STR_CHAPTER_PREFIX: "Fejezet: "
|
|||||||
STR_PAGES_SEPARATOR: " oldal | "
|
STR_PAGES_SEPARATOR: " oldal | "
|
||||||
STR_BOOK_PREFIX: "Könyv: "
|
STR_BOOK_PREFIX: "Könyv: "
|
||||||
STR_CALIBRE_URL_HINT: "Calibre esetén adj /opds-t az URL-hez"
|
STR_CALIBRE_URL_HINT: "Calibre esetén adj /opds-t az URL-hez"
|
||||||
STR_PERCENT_STEP_HINT: "Bal/Jobb: 1% Fel/Le: 10%"
|
|
||||||
STR_SYNCING_TIME: "Idő szinkronizálása..."
|
STR_SYNCING_TIME: "Idő szinkronizálása..."
|
||||||
STR_CALC_HASH: "Dokumentum hash kiszámítása..."
|
STR_CALC_HASH: "Dokumentum hash kiszámítása..."
|
||||||
STR_HASH_FAILED: "Dokumentum hash kiszámítása sikertelen"
|
STR_HASH_FAILED: "Dokumentum hash kiszámítása sikertelen"
|
||||||
@@ -292,7 +296,8 @@ STR_NO_FOOTNOTES: "Nincsenek lábjegyzetek ezen az oldalon"
|
|||||||
STR_LINK: "[link]"
|
STR_LINK: "[link]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u perc"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u perc"
|
||||||
STR_SLEEP_NEVER: "Soha"
|
STR_SLEEP_NEVER: "Soha"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Bal/Jobb: 1 perc Fel/Le: 5 perc"
|
STR_STEP_HINT_FRONT: "Elülső gombok:"
|
||||||
|
STR_STEP_HINT_SIDE: "Oldalsó gombok:"
|
||||||
STR_SCREENSHOT_BUTTON: "Képernyőkép készítése"
|
STR_SCREENSHOT_BUTTON: "Képernyőkép készítése"
|
||||||
STR_AUTO_TURN_ENABLED: "Automatikus lapozás bekapcsolva: "
|
STR_AUTO_TURN_ENABLED: "Automatikus lapozás bekapcsolva: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Automatikus lapozás (oldal/perc)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Automatikus lapozás (oldal/perc)"
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Modalità copertina"
|
|||||||
STR_HIDE_BATTERY: "Nascondi % batteria"
|
STR_HIDE_BATTERY: "Nascondi % batteria"
|
||||||
STR_EXTRA_SPACING: "Spaziatura extra paragrafi"
|
STR_EXTRA_SPACING: "Spaziatura extra paragrafi"
|
||||||
STR_TEXT_AA: "Anti-aliasing testo"
|
STR_TEXT_AA: "Anti-aliasing testo"
|
||||||
|
STR_TEXT_AA_FULL: "Completo"
|
||||||
|
STR_TEXT_AA_FAST: "Veloce"
|
||||||
STR_IMAGES: "Immagini"
|
STR_IMAGES: "Immagini"
|
||||||
STR_IMAGES_DISPLAY: "Visualizza"
|
STR_IMAGES_DISPLAY: "Visualizza"
|
||||||
STR_IMAGES_PLACEHOLDER: "Segnaposto"
|
STR_IMAGES_PLACEHOLDER: "Segnaposto"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Nascondi"
|
|||||||
STR_SHORT_PWR_BTN: "Press. breve pul. accensione"
|
STR_SHORT_PWR_BTN: "Press. breve pul. accensione"
|
||||||
STR_ORIENTATION: "Orientamento lettura"
|
STR_ORIENTATION: "Orientamento lettura"
|
||||||
STR_SIDE_BTN_LAYOUT: "Pul. laterali (lettore)"
|
STR_SIDE_BTN_LAYOUT: "Pul. laterali (lettore)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Controlli touch (lettore)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orienta pul. frontali"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orienta pul. frontali"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Press. lunga pul. laterali"
|
STR_LONG_PRESS_BEHAVIOR: "Press. lunga pul. laterali"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
||||||
@@ -138,7 +139,8 @@ STR_PAGE_TURN: "Cambio pagina"
|
|||||||
STR_FORCE_REFRESH: "Refresh"
|
STR_FORCE_REFRESH: "Refresh"
|
||||||
STR_PORTRAIT: "Verticale"
|
STR_PORTRAIT: "Verticale"
|
||||||
STR_LANDSCAPE_CW: "Orizzontale Dx"
|
STR_LANDSCAPE_CW: "Orizzontale Dx"
|
||||||
STR_INVERTED: "Capovolto"
|
STR_INVERTED: "Invertito"
|
||||||
|
STR_ORIENTATION_INVERTED: "Verticale 180°"
|
||||||
STR_LANDSCAPE_CCW: "Orizzontale Sx"
|
STR_LANDSCAPE_CCW: "Orizzontale Sx"
|
||||||
STR_PREV_NEXT: "Prec/Succ"
|
STR_PREV_NEXT: "Prec/Succ"
|
||||||
STR_NEXT_PREV: "Succ/Prec"
|
STR_NEXT_PREV: "Succ/Prec"
|
||||||
@@ -193,6 +195,7 @@ STR_HOME: "« Home"
|
|||||||
STR_SELECT: "Seleziona"
|
STR_SELECT: "Seleziona"
|
||||||
STR_SELECTED: "Selezionato"
|
STR_SELECTED: "Selezionato"
|
||||||
STR_TOGGLE: "Cambia"
|
STR_TOGGLE: "Cambia"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Attiva/disattiva segnalibro"
|
||||||
STR_CONFIRM: "Conferma"
|
STR_CONFIRM: "Conferma"
|
||||||
STR_CANCEL: "Annulla"
|
STR_CANCEL: "Annulla"
|
||||||
STR_CONNECT: "Connetti"
|
STR_CONNECT: "Connetti"
|
||||||
@@ -273,7 +276,6 @@ STR_CHAPTER_PREFIX: "Capitolo: "
|
|||||||
STR_PAGES_SEPARATOR: " pagine | "
|
STR_PAGES_SEPARATOR: " pagine | "
|
||||||
STR_BOOK_PREFIX: "Libro: "
|
STR_BOOK_PREFIX: "Libro: "
|
||||||
STR_CALIBRE_URL_HINT: "Per Calibre, aggiungere /opds all'URL"
|
STR_CALIBRE_URL_HINT: "Per Calibre, aggiungere /opds all'URL"
|
||||||
STR_PERCENT_STEP_HINT: "Sinistra/Destra: 1% Su/Giù: 10%"
|
|
||||||
STR_SYNCING_TIME: "Sincronizzazione orario..."
|
STR_SYNCING_TIME: "Sincronizzazione orario..."
|
||||||
STR_CALC_HASH: "Calcolo hash documento..."
|
STR_CALC_HASH: "Calcolo hash documento..."
|
||||||
STR_HASH_FAILED: "Impossibile calcolare l'hash del documento"
|
STR_HASH_FAILED: "Impossibile calcolare l'hash del documento"
|
||||||
@@ -306,7 +308,8 @@ STR_NO_FOOTNOTES: "Nessuna nota in questa pagina"
|
|||||||
STR_LINK: "[link]"
|
STR_LINK: "[link]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Mai"
|
STR_SLEEP_NEVER: "Mai"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Sinistra/Destra: 1 min Su/Giù: 5 min"
|
STR_STEP_HINT_FRONT: "Pulsanti frontali:"
|
||||||
|
STR_STEP_HINT_SIDE: "Pulsanti laterali:"
|
||||||
STR_SCREENSHOT_BUTTON: "Screenshot"
|
STR_SCREENSHOT_BUTTON: "Screenshot"
|
||||||
STR_ADD_SERVER: "Aggiungi server"
|
STR_ADD_SERVER: "Aggiungi server"
|
||||||
STR_SERVER_NAME: "Nome server"
|
STR_SERVER_NAME: "Nome server"
|
||||||
@@ -358,9 +361,9 @@ STR_FIRMWARE_WRITE_FAILED: "Aggiornamento firmware non riuscito"
|
|||||||
STR_FIRMWARE_UPDATE_DO_NOT_POWER_OFF: "Non spegnere il dispositivo!"
|
STR_FIRMWARE_UPDATE_DO_NOT_POWER_OFF: "Non spegnere il dispositivo!"
|
||||||
STR_RECOVERY_MODE: "Modalità ripristino"
|
STR_RECOVERY_MODE: "Modalità ripristino"
|
||||||
STR_RECOVERY_MODE_HINT: "Metti firmware.bin nella scheda SD e selezionalo"
|
STR_RECOVERY_MODE_HINT: "Metti firmware.bin nella scheda SD e selezionalo"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Tieni premuto Conferma nel lettore per creare un segnalibro"
|
|
||||||
STR_BOOKMARKS: "Segnalibri"
|
STR_BOOKMARKS: "Segnalibri"
|
||||||
STR_BOOKMARK_ADDED: "Segnalibro aggiunto"
|
STR_BOOKMARK_ADDED: "Segnalibro aggiunto"
|
||||||
|
STR_BOOKMARK_REMOVED: "Segnalibro rimosso"
|
||||||
STR_CONFIRM_DELETE_BOOKMARK: "Eliminare questo segnalibro?"
|
STR_CONFIRM_DELETE_BOOKMARK: "Eliminare questo segnalibro?"
|
||||||
STR_CLOCK_SYNC_NO_WIFI_HINT: "Connettiti prima al Wi-Fi e poi riprova"
|
STR_CLOCK_SYNC_NO_WIFI_HINT: "Connettiti prima al Wi-Fi e poi riprova"
|
||||||
STR_CLOCK_SYNC_OK: "Orologio sincronizzato"
|
STR_CLOCK_SYNC_OK: "Orologio sincronizzato"
|
||||||
@@ -375,10 +378,10 @@ STR_CLOCK_SYNCING: "Sincronizzazione con il server NTP..."
|
|||||||
STR_CLOCK_SYNC_FAIL: "Sincronizzazione non riuscita"
|
STR_CLOCK_SYNC_FAIL: "Sincronizzazione non riuscita"
|
||||||
STR_CLOCK_SYNC_NOW: "Sincronizza l'orologio adesso"
|
STR_CLOCK_SYNC_NOW: "Sincronizza l'orologio adesso"
|
||||||
STR_CLOCK_SYNC_NO_WIFI: "Wi-Fi non connesso"
|
STR_CLOCK_SYNC_NO_WIFI: "Wi-Fi non connesso"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Tieni premuto Conferma per cancellare"
|
STR_HOLD_OPEN_TO_DELETE: "Tieni premuto Apri per eliminare"
|
||||||
STR_NEXT_FIELD: "Succ."
|
STR_NEXT_FIELD: "Succ."
|
||||||
STR_CURRENT_TIME: "Ora attuale: "
|
STR_CURRENT_TIME: "Ora attuale: "
|
||||||
STR_DISABLED: "Disattivato"
|
STR_DISABLED: "Disattivato"
|
||||||
STR_BOOKMARK_OPTION: "Segnalibro"
|
STR_BOOKMARK_OPTION: "Segnalibro"
|
||||||
STR_KOSYNC: "KOSync"
|
STR_KOSYNC: "KOSync"
|
||||||
STR_PWR_BTN_FOOTNOTE_BACK: "Rientro rapido dalle note"
|
STR_PWR_BTN_FOOTNOTE_BACK: "Rientro rapido dalle note"
|
||||||
@@ -64,10 +64,11 @@ STR_SLEEP_COVER_MODE: "Ұйқы экраны мұқаба режимі"
|
|||||||
STR_HIDE_BATTERY: "Батарея % жасыру"
|
STR_HIDE_BATTERY: "Батарея % жасыру"
|
||||||
STR_EXTRA_SPACING: "Қосымша абзац аралығы"
|
STR_EXTRA_SPACING: "Қосымша абзац аралығы"
|
||||||
STR_TEXT_AA: "Мәтін сырғытпасы"
|
STR_TEXT_AA: "Мәтін сырғытпасы"
|
||||||
|
STR_TEXT_AA_FULL: "Толық"
|
||||||
|
STR_TEXT_AA_FAST: "Жылдам"
|
||||||
STR_SHORT_PWR_BTN: "Қуат түймесін қысқа басу"
|
STR_SHORT_PWR_BTN: "Қуат түймесін қысқа басу"
|
||||||
STR_ORIENTATION: "Оқу бағдары"
|
STR_ORIENTATION: "Оқу бағдары"
|
||||||
STR_SIDE_BTN_LAYOUT: "Бүйірлік түймелер орналасуы (оқырман)"
|
STR_SIDE_BTN_LAYOUT: "Бүйірлік түймелер орналасуы (оқырман)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Сенсорлық басқару (оқырман)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Алдыңғы түймелерді бағдарлау"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Алдыңғы түймелерді бағдарлау"
|
||||||
STR_LONG_PRESS_SKIP: "Ұзақ басу арқылы тарау өткізу"
|
STR_LONG_PRESS_SKIP: "Ұзақ басу арқылы тарау өткізу"
|
||||||
STR_FONT_PREVIEW_TEXT: "Канагаттандырылмагандыктарыныздан"
|
STR_FONT_PREVIEW_TEXT: "Канагаттандырылмагандыктарыныздан"
|
||||||
@@ -127,7 +128,8 @@ STR_SLEEP: "Ұйқы"
|
|||||||
STR_PAGE_TURN: "Бет аудару"
|
STR_PAGE_TURN: "Бет аудару"
|
||||||
STR_PORTRAIT: "Тік бағдар"
|
STR_PORTRAIT: "Тік бағдар"
|
||||||
STR_LANDSCAPE_CW: "Көлденең (сағат бағытымен)"
|
STR_LANDSCAPE_CW: "Көлденең (сағат бағытымен)"
|
||||||
STR_INVERTED: "Төңкерілген"
|
STR_INVERTED: "Инверсия"
|
||||||
|
STR_ORIENTATION_INVERTED: "Тік бағдар 180°"
|
||||||
STR_LANDSCAPE_CCW: "Көлденең (сағат тіліне қарсы)"
|
STR_LANDSCAPE_CCW: "Көлденең (сағат тіліне қарсы)"
|
||||||
STR_PREV_NEXT: "Алдыңғы/Келесі"
|
STR_PREV_NEXT: "Алдыңғы/Келесі"
|
||||||
STR_NEXT_PREV: "Келесі/Алдыңғы"
|
STR_NEXT_PREV: "Келесі/Алдыңғы"
|
||||||
@@ -178,6 +180,9 @@ STR_EXIT: "« Шығу"
|
|||||||
STR_HOME: "« Басты"
|
STR_HOME: "« Басты"
|
||||||
STR_SELECT: "Таңдау"
|
STR_SELECT: "Таңдау"
|
||||||
STR_TOGGLE: "Ауыстыру"
|
STR_TOGGLE: "Ауыстыру"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Бетбелгіні ауыстыру"
|
||||||
|
STR_BOOKMARK_REMOVED: "Бетбелгі жойылды."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Жою үшін Ашу түймесін ұстап тұрыңыз"
|
||||||
STR_CONFIRM: "Растау"
|
STR_CONFIRM: "Растау"
|
||||||
STR_CANCEL: "Болдырмау"
|
STR_CANCEL: "Болдырмау"
|
||||||
STR_CONNECT: "Қосылу"
|
STR_CONNECT: "Қосылу"
|
||||||
@@ -234,7 +239,6 @@ STR_CHAPTER_PREFIX: "Тарау: "
|
|||||||
STR_PAGES_SEPARATOR: " бет | "
|
STR_PAGES_SEPARATOR: " бет | "
|
||||||
STR_BOOK_PREFIX: "Кітап: "
|
STR_BOOK_PREFIX: "Кітап: "
|
||||||
STR_CALIBRE_URL_HINT: "Calibre үшін URL-ге /opds қосыңыз"
|
STR_CALIBRE_URL_HINT: "Calibre үшін URL-ге /opds қосыңыз"
|
||||||
STR_PERCENT_STEP_HINT: "Сол/Оң: 1% Жоғары/Төмен: 10%"
|
|
||||||
STR_SYNCING_TIME: "Уақыт синхрондалуда..."
|
STR_SYNCING_TIME: "Уақыт синхрондалуда..."
|
||||||
STR_CALC_HASH: "Құжат хэші есептелуде..."
|
STR_CALC_HASH: "Құжат хэші есептелуде..."
|
||||||
STR_HASH_FAILED: "Құжат хэшін есептеу сәтсіз"
|
STR_HASH_FAILED: "Құжат хэшін есептеу сәтсіз"
|
||||||
@@ -291,7 +295,8 @@ STR_NO_FOOTNOTES: "Бұл бетте түсіндірме жазбалар жо
|
|||||||
STR_LINK: "[сілтеме]"
|
STR_LINK: "[сілтеме]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u мин"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u мин"
|
||||||
STR_SLEEP_NEVER: "Ешқашан"
|
STR_SLEEP_NEVER: "Ешқашан"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Сол/Оң: 1 мин Жоғары/Төмен: 5 мин"
|
STR_STEP_HINT_FRONT: "Алдыңғы түймелер:"
|
||||||
|
STR_STEP_HINT_SIDE: "Бүйір түймелері:"
|
||||||
STR_SCREENSHOT_BUTTON: "Скриншот түсіру"
|
STR_SCREENSHOT_BUTTON: "Скриншот түсіру"
|
||||||
STR_AUTO_TURN_ENABLED: "Автоматты бет аудару қосулы: "
|
STR_AUTO_TURN_ENABLED: "Автоматты бет аудару қосулы: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Автоматты бет аудару (минутына бет саны)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Автоматты бет аудару (минутына бет саны)"
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Viršelio režimas"
|
|||||||
STR_HIDE_BATTERY: "Slėpti baterijos %"
|
STR_HIDE_BATTERY: "Slėpti baterijos %"
|
||||||
STR_EXTRA_SPACING: "Tarpai tarp pastraipų"
|
STR_EXTRA_SPACING: "Tarpai tarp pastraipų"
|
||||||
STR_TEXT_AA: "Teksto glotninimas"
|
STR_TEXT_AA: "Teksto glotninimas"
|
||||||
|
STR_TEXT_AA_FULL: "Pilnas"
|
||||||
|
STR_TEXT_AA_FAST: "Greitas"
|
||||||
STR_IMAGES: "Paveikslėliai"
|
STR_IMAGES: "Paveikslėliai"
|
||||||
STR_IMAGES_DISPLAY: "Rodyti"
|
STR_IMAGES_DISPLAY: "Rodyti"
|
||||||
STR_IMAGES_PLACEHOLDER: "Vietaženklis"
|
STR_IMAGES_PLACEHOLDER: "Vietaženklis"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Slėpti"
|
|||||||
STR_SHORT_PWR_BTN: "Trumpas įjungimo pasp."
|
STR_SHORT_PWR_BTN: "Trumpas įjungimo pasp."
|
||||||
STR_ORIENTATION: "Orientacija"
|
STR_ORIENTATION: "Orientacija"
|
||||||
STR_SIDE_BTN_LAYOUT: "Šoniniai mygtukai"
|
STR_SIDE_BTN_LAYOUT: "Šoniniai mygtukai"
|
||||||
STR_TOUCH_READER_CONTROLS: "Liečiamasis valdymas (skaityklė)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientuoti priekinius mygtukus"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientuoti priekinius mygtukus"
|
||||||
STR_LONG_PRESS_SKIP: "Praleisti skyrių (ilgai)"
|
STR_LONG_PRESS_SKIP: "Praleisti skyrių (ilgai)"
|
||||||
STR_FONT_PREVIEW_TEXT: "Įlinkdama fechtuotojo špaga sublykčiojusi pragręžė apvalų arbūzą"
|
STR_FONT_PREVIEW_TEXT: "Įlinkdama fechtuotojo špaga sublykčiojusi pragręžė apvalų arbūzą"
|
||||||
@@ -133,7 +134,8 @@ STR_SLEEP: "Miegas"
|
|||||||
STR_PAGE_TURN: "Versti psl."
|
STR_PAGE_TURN: "Versti psl."
|
||||||
STR_PORTRAIT: "Stačias"
|
STR_PORTRAIT: "Stačias"
|
||||||
STR_LANDSCAPE_CW: "Gulsčias (P)"
|
STR_LANDSCAPE_CW: "Gulsčias (P)"
|
||||||
STR_INVERTED: "Apverstas"
|
STR_INVERTED: "Invertuotas"
|
||||||
|
STR_ORIENTATION_INVERTED: "Stačias 180°"
|
||||||
STR_LANDSCAPE_CCW: "Gulsčias (A)"
|
STR_LANDSCAPE_CCW: "Gulsčias (A)"
|
||||||
STR_PREV_NEXT: "Atgal/Pirmyn"
|
STR_PREV_NEXT: "Atgal/Pirmyn"
|
||||||
STR_NEXT_PREV: "Pirmyn/Atgal"
|
STR_NEXT_PREV: "Pirmyn/Atgal"
|
||||||
@@ -185,6 +187,9 @@ STR_HOME: "« Pradžia"
|
|||||||
STR_SELECT: "Rinktis"
|
STR_SELECT: "Rinktis"
|
||||||
STR_SELECTED: "Pasirinkta"
|
STR_SELECTED: "Pasirinkta"
|
||||||
STR_TOGGLE: "Keisti"
|
STR_TOGGLE: "Keisti"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Perjungti žymę"
|
||||||
|
STR_BOOKMARK_REMOVED: "Žymė pašalinta."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Laikykite Atidaryti, kad ištrintumėte"
|
||||||
STR_CONFIRM: "Gerai"
|
STR_CONFIRM: "Gerai"
|
||||||
STR_CANCEL: "Atšaukti"
|
STR_CANCEL: "Atšaukti"
|
||||||
STR_CONNECT: "Jungtis"
|
STR_CONNECT: "Jungtis"
|
||||||
@@ -260,7 +265,6 @@ STR_CHAPTER_PREFIX: "Sk: "
|
|||||||
STR_PAGES_SEPARATOR: " psl. | "
|
STR_PAGES_SEPARATOR: " psl. | "
|
||||||
STR_BOOK_PREFIX: "Kn: "
|
STR_BOOK_PREFIX: "Kn: "
|
||||||
STR_CALIBRE_URL_HINT: "Pridėkite /opds prie URL"
|
STR_CALIBRE_URL_HINT: "Pridėkite /opds prie URL"
|
||||||
STR_PERCENT_STEP_HINT: "K/D: 1% | V/A: 10%"
|
|
||||||
STR_SYNCING_TIME: "Sinchr. laikas..."
|
STR_SYNCING_TIME: "Sinchr. laikas..."
|
||||||
STR_CALC_HASH: "Skaičiuojama maiša..."
|
STR_CALC_HASH: "Skaičiuojama maiša..."
|
||||||
STR_HASH_FAILED: "Maišos klaida"
|
STR_HASH_FAILED: "Maišos klaida"
|
||||||
@@ -292,7 +296,8 @@ STR_NO_FOOTNOTES: "Šiame psl. išnašų nėra"
|
|||||||
STR_LINK: "[nuoroda]"
|
STR_LINK: "[nuoroda]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min."
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min."
|
||||||
STR_SLEEP_NEVER: "Niekada"
|
STR_SLEEP_NEVER: "Niekada"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Kairė/Dešinė: 1 min. Viršus/Apačia: 5 min."
|
STR_STEP_HINT_FRONT: "Priekiniai mygtukai:"
|
||||||
|
STR_STEP_HINT_SIDE: "Šoniniai mygtukai:"
|
||||||
STR_SCREENSHOT_BUTTON: "Ekrano nuotrauka"
|
STR_SCREENSHOT_BUTTON: "Ekrano nuotrauka"
|
||||||
STR_AUTO_TURN_ENABLED: "Auto-vertimas: "
|
STR_AUTO_TURN_ENABLED: "Auto-vertimas: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Auto-vertimas (psl/min)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Auto-vertimas (psl/min)"
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Okładki wygaszacza"
|
|||||||
STR_HIDE_BATTERY: "Ukryj % baterii"
|
STR_HIDE_BATTERY: "Ukryj % baterii"
|
||||||
STR_EXTRA_SPACING: "Dodatkowe odstępy paragrafów"
|
STR_EXTRA_SPACING: "Dodatkowe odstępy paragrafów"
|
||||||
STR_TEXT_AA: "Wygładzanie tekstu"
|
STR_TEXT_AA: "Wygładzanie tekstu"
|
||||||
|
STR_TEXT_AA_FULL: "Pełne"
|
||||||
|
STR_TEXT_AA_FAST: "Szybkie"
|
||||||
STR_IMAGES: "Obrazki"
|
STR_IMAGES: "Obrazki"
|
||||||
STR_IMAGES_DISPLAY: "Pokazuj"
|
STR_IMAGES_DISPLAY: "Pokazuj"
|
||||||
STR_IMAGES_PLACEHOLDER: "Ramki"
|
STR_IMAGES_PLACEHOLDER: "Ramki"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Pomijaj"
|
|||||||
STR_SHORT_PWR_BTN: "Krótkie naciśnięcie zasilania"
|
STR_SHORT_PWR_BTN: "Krótkie naciśnięcie zasilania"
|
||||||
STR_ORIENTATION: "Układ czytania"
|
STR_ORIENTATION: "Układ czytania"
|
||||||
STR_SIDE_BTN_LAYOUT: "Układ przycisków bocznych"
|
STR_SIDE_BTN_LAYOUT: "Układ przycisków bocznych"
|
||||||
STR_TOUCH_READER_CONTROLS: "Sterowanie dotykowe (czytnik)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientuj przednie przyciski"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientuj przednie przyciski"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Funkcja długiego przyciśnięcia"
|
STR_LONG_PRESS_BEHAVIOR: "Funkcja długiego przyciśnięcia"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Wył."
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Wył."
|
||||||
@@ -137,7 +138,8 @@ STR_PAGE_TURN: "Nast. str."
|
|||||||
STR_FORCE_REFRESH: "Odśwież ekran"
|
STR_FORCE_REFRESH: "Odśwież ekran"
|
||||||
STR_PORTRAIT: "Pionowo"
|
STR_PORTRAIT: "Pionowo"
|
||||||
STR_LANDSCAPE_CW: "Poziomo P"
|
STR_LANDSCAPE_CW: "Poziomo P"
|
||||||
STR_INVERTED: "Odwrócony"
|
STR_INVERTED: "Inwersja"
|
||||||
|
STR_ORIENTATION_INVERTED: "Pionowo 180°"
|
||||||
STR_LANDSCAPE_CCW: "Poziomo L"
|
STR_LANDSCAPE_CCW: "Poziomo L"
|
||||||
STR_PREV_NEXT: "Poprz./Nast."
|
STR_PREV_NEXT: "Poprz./Nast."
|
||||||
STR_NEXT_PREV: "Nast./Poprz."
|
STR_NEXT_PREV: "Nast./Poprz."
|
||||||
@@ -192,6 +194,9 @@ STR_HOME: "« Home"
|
|||||||
STR_SELECT: "Wybierz"
|
STR_SELECT: "Wybierz"
|
||||||
STR_SELECTED: "Wybrano"
|
STR_SELECTED: "Wybrano"
|
||||||
STR_TOGGLE: "Zmień"
|
STR_TOGGLE: "Zmień"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Przełącz zakładkę"
|
||||||
|
STR_BOOKMARK_REMOVED: "Zakładka usunięta."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Przytrzymaj Otwórz, aby usunąć"
|
||||||
STR_CONFIRM: "Potwierdź"
|
STR_CONFIRM: "Potwierdź"
|
||||||
STR_CANCEL: "Anuluj"
|
STR_CANCEL: "Anuluj"
|
||||||
STR_CONNECT: "Połącz"
|
STR_CONNECT: "Połącz"
|
||||||
@@ -272,7 +277,6 @@ STR_CHAPTER_PREFIX: "Rozdział: "
|
|||||||
STR_PAGES_SEPARATOR: " stron | "
|
STR_PAGES_SEPARATOR: " stron | "
|
||||||
STR_BOOK_PREFIX: "Książka: "
|
STR_BOOK_PREFIX: "Książka: "
|
||||||
STR_CALIBRE_URL_HINT: "Dla Calibre, dodaj /opds do adresu URL"
|
STR_CALIBRE_URL_HINT: "Dla Calibre, dodaj /opds do adresu URL"
|
||||||
STR_PERCENT_STEP_HINT: "Lewo/Prawo: 1% Góra/Dół: 10%"
|
|
||||||
STR_SYNCING_TIME: "Synchronizacja czasu..."
|
STR_SYNCING_TIME: "Synchronizacja czasu..."
|
||||||
STR_CALC_HASH: "Obliczanie sumy kontrolnej..."
|
STR_CALC_HASH: "Obliczanie sumy kontrolnej..."
|
||||||
STR_HASH_FAILED: "Błąd obliczania sumy kontrolnej"
|
STR_HASH_FAILED: "Błąd obliczania sumy kontrolnej"
|
||||||
@@ -305,7 +309,8 @@ STR_NO_FOOTNOTES: "Brak przypisów na tej stronie"
|
|||||||
STR_LINK: "[link]"
|
STR_LINK: "[link]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Nigdy"
|
STR_SLEEP_NEVER: "Nigdy"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Lewo/Prawo: 1 min Góra/Dół: 5 min"
|
STR_STEP_HINT_FRONT: "Przyciski przednie:"
|
||||||
|
STR_STEP_HINT_SIDE: "Przyciski boczne:"
|
||||||
STR_SCREENSHOT_BUTTON: "Zrób zrzut ekranu"
|
STR_SCREENSHOT_BUTTON: "Zrób zrzut ekranu"
|
||||||
STR_ADD_SERVER: "Dodaj serwer"
|
STR_ADD_SERVER: "Dodaj serwer"
|
||||||
STR_SERVER_NAME: "Nazwa serwera"
|
STR_SERVER_NAME: "Nazwa serwera"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ STR_END_OF_BOOK: "Fim do livro"
|
|||||||
STR_EMPTY_CHAPTER: "Capítulo vazio"
|
STR_EMPTY_CHAPTER: "Capítulo vazio"
|
||||||
STR_INDEXING: "Indexando"
|
STR_INDEXING: "Indexando"
|
||||||
STR_MEMORY_ERROR: "Erro de memória"
|
STR_MEMORY_ERROR: "Erro de memória"
|
||||||
STR_PAGE_LOAD_ERROR: "Erro página"
|
STR_PAGE_LOAD_ERROR: "Erro ao carregar pág."
|
||||||
STR_EMPTY_FILE: "Arquivo vazio"
|
STR_EMPTY_FILE: "Arquivo vazio"
|
||||||
STR_OUT_OF_BOUNDS: "Fora dos limites"
|
STR_OUT_OF_BOUNDS: "Fora dos limites"
|
||||||
STR_LOADING: "Carregando..."
|
STR_LOADING: "Carregando..."
|
||||||
@@ -32,8 +32,8 @@ STR_CONNECTING: "Conectando..."
|
|||||||
STR_CONNECTED: "Conectado!"
|
STR_CONNECTED: "Conectado!"
|
||||||
STR_CONNECTION_FAILED: "Falha na conexão"
|
STR_CONNECTION_FAILED: "Falha na conexão"
|
||||||
STR_FORGET_NETWORK: "Esquecer rede?"
|
STR_FORGET_NETWORK: "Esquecer rede?"
|
||||||
STR_SAVE_PASSWORD: "Salvar senha a próxima vez?"
|
STR_SAVE_PASSWORD: "Salvar senha na próxima vez?"
|
||||||
STR_PRESS_OK_SCAN: "Pressione OK procurar novamente"
|
STR_PRESS_OK_SCAN: "Pressione OK para buscar novamente"
|
||||||
STR_JOIN_NETWORK: "Entrar em uma rede"
|
STR_JOIN_NETWORK: "Entrar em uma rede"
|
||||||
STR_CREATE_HOTSPOT: "Criar hotspot"
|
STR_CREATE_HOTSPOT: "Criar hotspot"
|
||||||
STR_JOIN_DESC: "Conecte-se a uma rede Wi-Fi existente"
|
STR_JOIN_DESC: "Conecte-se a uma rede Wi-Fi existente"
|
||||||
@@ -41,7 +41,7 @@ STR_HOTSPOT_DESC: "Crie uma rede Wi-Fi para outras pessoas entrarem"
|
|||||||
STR_STARTING_HOTSPOT: "Iniciando hotspot..."
|
STR_STARTING_HOTSPOT: "Iniciando hotspot..."
|
||||||
STR_HOTSPOT_MODE: "Modo hotspot"
|
STR_HOTSPOT_MODE: "Modo hotspot"
|
||||||
STR_CONNECT_WIFI_HINT: "Conecte seu dispositivo a esta rede Wi-Fi"
|
STR_CONNECT_WIFI_HINT: "Conecte seu dispositivo a esta rede Wi-Fi"
|
||||||
STR_OPEN_URL_HINT: "Abra este URL seu navegador"
|
STR_OPEN_URL_HINT: "Abra esta URL no seu navegador"
|
||||||
STR_OR_HTTP_PREFIX: "ou http://"
|
STR_OR_HTTP_PREFIX: "ou http://"
|
||||||
STR_SCAN_QR_HINT: "ou escaneie o QR code com seu celular:"
|
STR_SCAN_QR_HINT: "ou escaneie o QR code com seu celular:"
|
||||||
STR_CALIBRE_WIRELESS: "Calibre sem fio"
|
STR_CALIBRE_WIRELESS: "Calibre sem fio"
|
||||||
@@ -50,31 +50,38 @@ STR_MAC_ADDRESS: "Endereço MAC:"
|
|||||||
STR_CHECKING_WIFI: "Verificando Wi-Fi..."
|
STR_CHECKING_WIFI: "Verificando Wi-Fi..."
|
||||||
STR_ENTER_WIFI_PASSWORD: "Digite a senha Wi-Fi"
|
STR_ENTER_WIFI_PASSWORD: "Digite a senha Wi-Fi"
|
||||||
STR_TO_PREFIX: "para"
|
STR_TO_PREFIX: "para"
|
||||||
STR_CALIBRE_RECEIVING: "Recebendo:"
|
STR_CALIBRE_RECEIVING: "Recebendo: "
|
||||||
STR_CALIBRE_RECEIVED: "Recebido:"
|
STR_CALIBRE_RECEIVED: "Recebido: "
|
||||||
STR_CALIBRE_INSTRUCTION_1: "1) Instale o plugin CrossPoint Reader"
|
STR_CALIBRE_INSTRUCTION_1: "1) Instale o plugin CrossPoint Reader"
|
||||||
STR_CALIBRE_INSTRUCTION_2: "2) Esteja na mesma rede Wi-Fi"
|
STR_CALIBRE_INSTRUCTION_2: "2) Esteja na mesma rede Wi-Fi"
|
||||||
STR_CALIBRE_INSTRUCTION_3: "3) No Calibre: \"Enviar o dispositivo\""
|
STR_CALIBRE_INSTRUCTION_3: "3) No Calibre: \"Enviar ao dispositivo\""
|
||||||
STR_CALIBRE_INSTRUCTION_4: "\"Mantenha esta tela aberta durante o envio\""
|
STR_CALIBRE_INSTRUCTION_4: "\"Mantenha esta tela aberta durante o envio\""
|
||||||
STR_CAT_DISPLAY: "Tela"
|
STR_CAT_DISPLAY: "Tela"
|
||||||
STR_CAT_READER: "Leitor"
|
STR_CAT_READER: "Leitor"
|
||||||
STR_CAT_CONTROLS: "Controles"
|
STR_CAT_CONTROLS: "Controles"
|
||||||
STR_CAT_SYSTEM: "Sistema"
|
STR_CAT_SYSTEM: "Sistema"
|
||||||
STR_SLEEP_SCREEN: "Tela de repouso"
|
STR_SLEEP_SCREEN: "Tela de repouso"
|
||||||
|
STR_QUICK_RESUME_TIMEOUT: "Retomada rápida após tempo limite"
|
||||||
STR_SLEEP_COVER_MODE: "Modo capa tela repouso"
|
STR_SLEEP_COVER_MODE: "Modo capa tela repouso"
|
||||||
STR_HIDE_BATTERY: "Ocultar % da bateria"
|
STR_HIDE_BATTERY: "Ocultar % da bateria"
|
||||||
STR_EXTRA_SPACING: "Espaço de parágrafos extra"
|
STR_EXTRA_SPACING: "Espaço de parágrafos extra"
|
||||||
STR_TEXT_AA: "Suavização de texto"
|
STR_TEXT_AA: "Suavização de texto"
|
||||||
|
STR_TEXT_AA_FULL: "Completa"
|
||||||
|
STR_TEXT_AA_FAST: "Rápida"
|
||||||
|
STR_IMAGES: "Imagens"
|
||||||
|
STR_IMAGES_DISPLAY: "Exibição"
|
||||||
|
STR_IMAGES_PLACEHOLDER: "Espaço reservado"
|
||||||
|
STR_IMAGES_SUPPRESS: "Ocultar"
|
||||||
STR_SHORT_PWR_BTN: "Clique curto botão ligar"
|
STR_SHORT_PWR_BTN: "Clique curto botão ligar"
|
||||||
STR_ORIENTATION: "Orientação de leitura"
|
STR_ORIENTATION: "Orientação de leitura"
|
||||||
STR_SIDE_BTN_LAYOUT: "Disposição botões laterais"
|
STR_SIDE_BTN_LAYOUT: "Disposição botões laterais"
|
||||||
STR_TOUCH_READER_CONTROLS: "Controlos táteis do leitor"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientar botões frontais"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientar botões frontais"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Comportamento do botão de premir e segurar"
|
STR_LONG_PRESS_BEHAVIOR: "Comportamento de Pressionar e segurar"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Desligado"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "DESL."
|
||||||
STR_LONG_PRESS_BEHAVIOR_SKIP: "Saltar capítulo"
|
STR_LONG_PRESS_BEHAVIOR_SKIP: "Pular capítulo"
|
||||||
STR_LONG_PRESS_BEHAVIOR_ORIENTATION: "Alterar orientação"
|
STR_LONG_PRESS_BEHAVIOR_ORIENTATION: "Alterar orientação"
|
||||||
STR_FONT_PREVIEW_TEXT: "Vejo galã sexy pôr quinze kiwis à força em baú achatado"
|
STR_LONG_PRESS_MENU: "Pressionar e segurar Menu"
|
||||||
|
STR_FONT_PREVIEW_TEXT: "Um pequeno jabuti xereta viu dez cegonhas felizes. "
|
||||||
STR_FONT_FAMILY: "Fonte do leitor"
|
STR_FONT_FAMILY: "Fonte do leitor"
|
||||||
STR_FONT_SIZE: "Tam. fonte UI"
|
STR_FONT_SIZE: "Tam. fonte UI"
|
||||||
STR_LINE_SPACING: "Espaçamento entre linhas"
|
STR_LINE_SPACING: "Espaçamento entre linhas"
|
||||||
@@ -82,6 +89,7 @@ STR_SCREEN_MARGIN: "Margens da tela"
|
|||||||
STR_PARA_ALIGNMENT: "Alinhamento parágrafo"
|
STR_PARA_ALIGNMENT: "Alinhamento parágrafo"
|
||||||
STR_HYPHENATION: "Hifenização"
|
STR_HYPHENATION: "Hifenização"
|
||||||
STR_TIME_TO_SLEEP: "Tempo para repousar"
|
STR_TIME_TO_SLEEP: "Tempo para repousar"
|
||||||
|
STR_SHOW_HIDDEN_FILES: "Mostrar arquivos ocultos"
|
||||||
STR_REMOVE_READ_FROM_RECENTS: "Limpar livros lidos da lista de recentes"
|
STR_REMOVE_READ_FROM_RECENTS: "Limpar livros lidos da lista de recentes"
|
||||||
STR_MOVE_FINISHED_TO_READ: "Mover livros lidos para a pasta Read"
|
STR_MOVE_FINISHED_TO_READ: "Mover livros lidos para a pasta Read"
|
||||||
STR_REFRESH_FREQ: "Frequência atualização"
|
STR_REFRESH_FREQ: "Frequência atualização"
|
||||||
@@ -129,12 +137,17 @@ STR_ALWAYS: "Sempre"
|
|||||||
STR_IGNORE: "Ignorar"
|
STR_IGNORE: "Ignorar"
|
||||||
STR_SLEEP: "Repouso"
|
STR_SLEEP: "Repouso"
|
||||||
STR_PAGE_TURN: "Virar página"
|
STR_PAGE_TURN: "Virar página"
|
||||||
|
STR_FORCE_REFRESH: "Atualizar tela"
|
||||||
STR_PORTRAIT: "Retrato"
|
STR_PORTRAIT: "Retrato"
|
||||||
STR_LANDSCAPE_CW: "Paisagem H"
|
STR_LANDSCAPE_CW: "Paisagem H"
|
||||||
STR_INVERTED: "Invertido"
|
STR_INVERTED: "Invertido"
|
||||||
|
STR_ORIENTATION_INVERTED: "Retrato 180°"
|
||||||
STR_LANDSCAPE_CCW: "Paisagem AH"
|
STR_LANDSCAPE_CCW: "Paisagem AH"
|
||||||
STR_PREV_NEXT: "Ant/Próx"
|
STR_PREV_NEXT: "Ant/Próx"
|
||||||
STR_NEXT_PREV: "Próx/Ant"
|
STR_NEXT_PREV: "Próx/Ant"
|
||||||
|
STR_KOSYNC: "KOSync"
|
||||||
|
STR_BOOKMARK_OPTION: "Marcador"
|
||||||
|
STR_DISABLED: "Desabilitado"
|
||||||
STR_NOTO_SERIF: "Noto Serif"
|
STR_NOTO_SERIF: "Noto Serif"
|
||||||
STR_NOTO_SANS: "Noto Sans"
|
STR_NOTO_SANS: "Noto Sans"
|
||||||
STR_SMALL: "Pequeno"
|
STR_SMALL: "Pequeno"
|
||||||
@@ -162,17 +175,21 @@ STR_UPDATING: "Atualizando..."
|
|||||||
STR_NO_UPDATE: "Nenhuma atualização disponível"
|
STR_NO_UPDATE: "Nenhuma atualização disponível"
|
||||||
STR_UPDATE_FAILED: "Falha na atualização"
|
STR_UPDATE_FAILED: "Falha na atualização"
|
||||||
STR_UPDATE_COMPLETE: "Atualização concluída"
|
STR_UPDATE_COMPLETE: "Atualização concluída"
|
||||||
STR_POWER_ON_HINT: "Pressione e segure o botão energia ligar novamente"
|
STR_POWER_ON_HINT: "Pressione e segure o botão de energia para ligar novamente"
|
||||||
STR_NO_ENTRIES: "Nenhum entries encontrado"
|
STR_RESTARTING_HINT: "Reiniciando... Se não reiniciar, pressione e segure o botão de energia por alguns segundos."
|
||||||
|
STR_NO_ENTRIES: "Nenhuma entrada encontrada"
|
||||||
STR_DOWNLOADING: "Baixando..."
|
STR_DOWNLOADING: "Baixando..."
|
||||||
STR_DOWNLOAD_FAILED: "Falha no download"
|
STR_DOWNLOAD_FAILED: "Falha no download"
|
||||||
STR_ERROR_MSG: "Erro:"
|
STR_ERROR_MSG: "Erro:"
|
||||||
STR_UNNAMED: "Sem nome"
|
STR_UNNAMED: "Sem nome"
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Segure 'Abrir' para excluir"
|
||||||
STR_NO_SERVER_URL: "Nenhum URL servidor configurado"
|
STR_NO_SERVER_URL: "Nenhum URL servidor configurado"
|
||||||
STR_FETCH_FEED_FAILED: "Falha ao buscar o feed"
|
STR_FETCH_FEED_FAILED: "Falha ao buscar o feed"
|
||||||
STR_PARSE_FEED_FAILED: "Falha ao interpretar o feed"
|
STR_PARSE_FEED_FAILED: "Falha ao interpretar o feed"
|
||||||
STR_NETWORK_PREFIX: "Rede:"
|
STR_NEXT_PAGE: "Próxima Página »"
|
||||||
STR_IP_ADDRESS_PREFIX: "Endereço IP:"
|
STR_PREV_PAGE: "« Página Anterior"
|
||||||
|
STR_NETWORK_PREFIX: "Rede: "
|
||||||
|
STR_IP_ADDRESS_PREFIX: "Endereço IP: "
|
||||||
STR_ERROR_GENERAL_FAILURE: "Erro: falha geral"
|
STR_ERROR_GENERAL_FAILURE: "Erro: falha geral"
|
||||||
STR_ERROR_NETWORK_NOT_FOUND: "Erro: rede não encontrada"
|
STR_ERROR_NETWORK_NOT_FOUND: "Erro: rede não encontrada"
|
||||||
STR_ERROR_CONNECTION_TIMEOUT: "Erro: tempo limite conexão"
|
STR_ERROR_CONNECTION_TIMEOUT: "Erro: tempo limite conexão"
|
||||||
@@ -181,7 +198,9 @@ STR_BACK: "« Voltar"
|
|||||||
STR_EXIT: "« Sair"
|
STR_EXIT: "« Sair"
|
||||||
STR_HOME: "« Início"
|
STR_HOME: "« Início"
|
||||||
STR_SELECT: "Escolher"
|
STR_SELECT: "Escolher"
|
||||||
|
STR_SELECTED: "Selecionado"
|
||||||
STR_TOGGLE: "Alternar"
|
STR_TOGGLE: "Alternar"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Alternar marcador"
|
||||||
STR_CONFIRM: "Confirmar"
|
STR_CONFIRM: "Confirmar"
|
||||||
STR_CANCEL: "Cancelar"
|
STR_CANCEL: "Cancelar"
|
||||||
STR_CONNECT: "Conectar"
|
STR_CONNECT: "Conectar"
|
||||||
@@ -190,6 +209,8 @@ STR_DOWNLOAD: "Baixar"
|
|||||||
STR_RETRY: "Tentar novamente"
|
STR_RETRY: "Tentar novamente"
|
||||||
STR_YES: "Sim"
|
STR_YES: "Sim"
|
||||||
STR_NO: "Não"
|
STR_NO: "Não"
|
||||||
|
STR_SHOW: "Mostrar"
|
||||||
|
STR_HIDE: "Ocultar"
|
||||||
STR_STATE_ON: "LIG."
|
STR_STATE_ON: "LIG."
|
||||||
STR_STATE_OFF: "DESL."
|
STR_STATE_OFF: "DESL."
|
||||||
STR_NOT_SET: "Não definido"
|
STR_NOT_SET: "Não definido"
|
||||||
@@ -200,15 +221,51 @@ STR_DIR_DOWN: "Baixo"
|
|||||||
STR_OK_BUTTON: "OK"
|
STR_OK_BUTTON: "OK"
|
||||||
STR_SLEEP_COVER_FILTER: "Filtro capa tela repouso"
|
STR_SLEEP_COVER_FILTER: "Filtro capa tela repouso"
|
||||||
STR_FILTER_CONTRAST: "Contraste"
|
STR_FILTER_CONTRAST: "Contraste"
|
||||||
STR_UI_THEME: "Tema da interface"
|
STR_CUSTOMISE_STATUS_BAR: "Customizar Barra de Status"
|
||||||
|
STR_CHAPTER_PAGE_COUNT: "Páginas do Capítulo"
|
||||||
|
STR_BOOK_PROGRESS_PERCENTAGE: "Porcentagem de Progresso"
|
||||||
|
STR_PROGRESS_BAR: "Barra de Progresso"
|
||||||
|
STR_PROGRESS_BAR_THICKNESS: "Espessura da Barra de Progresso"
|
||||||
|
STR_PROGRESS_BAR_THIN: "Fino"
|
||||||
|
STR_PROGRESS_BAR_MEDIUM: "Médio"
|
||||||
|
STR_PROGRESS_BAR_THICK: "Grosso"
|
||||||
|
STR_BOOK: "Livro"
|
||||||
|
STR_CHAPTER: "Capítulo"
|
||||||
|
STR_EXAMPLE_CHAPTER: "Capítulo 21"
|
||||||
|
STR_EXAMPLE_BOOK: "Título do Livro"
|
||||||
|
STR_PREVIEW: "Prévia"
|
||||||
|
STR_TITLE: "Título"
|
||||||
|
STR_BATTERY: "Bateria"
|
||||||
|
STR_XTC_STATUS_BAR: "Barra de Status XTC"
|
||||||
|
STR_BOTTOM: "Baixo"
|
||||||
|
STR_TOP: "Topo"
|
||||||
|
STR_CLOCK: "Relógio"
|
||||||
|
STR_CLOCK_UTC_OFFSET: "Offset UTC do Relógio"
|
||||||
|
STR_CLOCK_FORMAT: "Formato do Relógio"
|
||||||
|
STR_CLOCK_FORMAT_24H: "24 horas"
|
||||||
|
STR_CLOCK_FORMAT_12H: "12 horas"
|
||||||
|
STR_CURRENT_TIME: "Hora atual:"
|
||||||
|
STR_NEXT_FIELD: "Próximo"
|
||||||
|
STR_CLOCK_SYNC: "Sincronizar Relógio"
|
||||||
|
STR_CLOCK_SYNC_NOW: "Sincronizar relógio agora"
|
||||||
|
STR_CLOCK_SYNCING: "Sincronizando via NTP..."
|
||||||
|
STR_CLOCK_SYNC_OK: "Relógio sincronizado"
|
||||||
|
STR_CLOCK_SYNC_FAIL: "Falha na sincronização"
|
||||||
|
STR_CLOCK_SYNC_NO_WIFI: "Wi-Fi não conectado"
|
||||||
|
STR_CLOCK_SYNC_NO_WIFI_HINT: "Conecte ao Wi-Fi primeiro, depois tente novamente."
|
||||||
|
STR_CLOCK_SYNCED: "Relógio sincronizado"
|
||||||
|
STR_UI_THEME: "Tema"
|
||||||
STR_THEME_CLASSIC: "Clássico"
|
STR_THEME_CLASSIC: "Clássico"
|
||||||
STR_THEME_LYRA: "Lyra"
|
STR_THEME_LYRA: "Lyra"
|
||||||
STR_THEME_ROUNDEDRAFF: "RoundedRaff"
|
STR_THEME_ROUNDEDRAFF: "RoundedRaff"
|
||||||
STR_THEME_LYRA_EXTENDED: "Lyra Extended"
|
STR_THEME_LYRA_EXTENDED: "Lyra Estendido"
|
||||||
STR_SUNLIGHT_FADING_FIX: "Ajuste desbotamento ao sol"
|
STR_SUNLIGHT_FADING_FIX: "Ajuste desbotamento ao sol"
|
||||||
STR_QUICK_RESUME_TIMEOUT: "Retomada rápida após tempo limite"
|
|
||||||
STR_REMAP_FRONT_BUTTONS: "Remapear botões frontais"
|
STR_REMAP_FRONT_BUTTONS: "Remapear botões frontais"
|
||||||
|
STR_BOOKMARKS: "Marcadores"
|
||||||
|
STR_BOOKMARK_ADDED: "Marcador adicionado."
|
||||||
|
STR_BOOKMARK_REMOVED: "Marcador removido."
|
||||||
STR_OPDS_BROWSER: "Navegador OPDS"
|
STR_OPDS_BROWSER: "Navegador OPDS"
|
||||||
|
STR_SEARCH: "Busca"
|
||||||
STR_COVER_CUSTOM: "Capa + personalizado"
|
STR_COVER_CUSTOM: "Capa + personalizado"
|
||||||
STR_QUICK_RESUME: "Retomada rápida"
|
STR_QUICK_RESUME: "Retomada rápida"
|
||||||
STR_MENU_RECENT_BOOKS: "Livros recentes"
|
STR_MENU_RECENT_BOOKS: "Livros recentes"
|
||||||
@@ -222,11 +279,11 @@ STR_CALIBRE_SETUP: "Configuração"
|
|||||||
STR_CALIBRE_STATUS: "Status"
|
STR_CALIBRE_STATUS: "Status"
|
||||||
STR_CLEAR_BUTTON: "Limpar"
|
STR_CLEAR_BUTTON: "Limpar"
|
||||||
STR_DEFAULT_VALUE: "Padrão"
|
STR_DEFAULT_VALUE: "Padrão"
|
||||||
STR_REMAP_PROMPT: "Pressione um botão frontal cada função"
|
STR_REMAP_PROMPT: "Pressione um botão frontal para cada função"
|
||||||
STR_UNASSIGNED: "Não atribuído"
|
STR_UNASSIGNED: "Não atribuído"
|
||||||
STR_ALREADY_ASSIGNED: "Já atribuído"
|
STR_ALREADY_ASSIGNED: "Já atribuído"
|
||||||
STR_REMAP_RESET_HINT: "Botão lateral cima: redefinir o disposição padrão"
|
STR_REMAP_RESET_HINT: "Botão lateral de cima: redefinir layout padrão"
|
||||||
STR_REMAP_CANCEL_HINT: "Botão lateral baixo: cancelar remapeamento"
|
STR_REMAP_CANCEL_HINT: "Botão lateral de baixo: cancelar remapeamento"
|
||||||
STR_HW_BACK_LABEL: "Voltar (1º botão)"
|
STR_HW_BACK_LABEL: "Voltar (1º botão)"
|
||||||
STR_HW_CONFIRM_LABEL: "Confirmar (2º botão)"
|
STR_HW_CONFIRM_LABEL: "Confirmar (2º botão)"
|
||||||
STR_HW_LEFT_LABEL: "Esquerda (3º botão)"
|
STR_HW_LEFT_LABEL: "Esquerda (3º botão)"
|
||||||
@@ -236,14 +293,15 @@ STR_GO_HOME_BUTTON: "Ir para o início"
|
|||||||
STR_SYNC_PROGRESS: "Sincronizar progresso"
|
STR_SYNC_PROGRESS: "Sincronizar progresso"
|
||||||
STR_DELETE_CACHE: "Excluir cache do livro"
|
STR_DELETE_CACHE: "Excluir cache do livro"
|
||||||
STR_DELETE: "Excluir"
|
STR_DELETE: "Excluir"
|
||||||
|
STR_CONFIRM_DELETE_BOOKMARK: "Excluir este marcador?"
|
||||||
|
STR_DISPLAY_QR: "Mostrar página como QR"
|
||||||
STR_CHAPTER_PREFIX: "Capítulo:"
|
STR_CHAPTER_PREFIX: "Capítulo:"
|
||||||
STR_PAGES_SEPARATOR: "páginas |"
|
STR_PAGES_SEPARATOR: "páginas |"
|
||||||
STR_BOOK_PREFIX: "Livro:"
|
STR_BOOK_PREFIX: "Livro:"
|
||||||
STR_CALIBRE_URL_HINT: "Para o Calibre, adicione /opds ao seu URL"
|
STR_CALIBRE_URL_HINT: "Para o Calibre, adicione /opds ao seu URL"
|
||||||
STR_PERCENT_STEP_HINT: "Esq/Dir: 1% Cima/Baixo: 10%"
|
|
||||||
STR_SYNCING_TIME: "Sincronizando horário..."
|
STR_SYNCING_TIME: "Sincronizando horário..."
|
||||||
STR_CALC_HASH: "Calculando hash documento..."
|
STR_CALC_HASH: "Calculando hash do documento..."
|
||||||
STR_HASH_FAILED: "Falha ao calcular o hash documento"
|
STR_HASH_FAILED: "Falha ao calcular o hash do documento"
|
||||||
STR_FETCH_PROGRESS: "Buscando progresso remoto..."
|
STR_FETCH_PROGRESS: "Buscando progresso remoto..."
|
||||||
STR_UPLOAD_PROGRESS: "Enviando progresso..."
|
STR_UPLOAD_PROGRESS: "Enviando progresso..."
|
||||||
STR_NO_CREDENTIALS_MSG: "Nenhuma credencial configurada"
|
STR_NO_CREDENTIALS_MSG: "Nenhuma credencial configurada"
|
||||||
@@ -261,14 +319,69 @@ STR_UPLOAD_PROMPT: "Enviar posição atual?"
|
|||||||
STR_UPLOAD_SUCCESS: "Progresso enviado!"
|
STR_UPLOAD_SUCCESS: "Progresso enviado!"
|
||||||
STR_SYNC_FAILED_MSG: "Falha na sincronização"
|
STR_SYNC_FAILED_MSG: "Falha na sincronização"
|
||||||
STR_SAVE_PROGRESS_FAILED: "Não foi possível salvar o progresso"
|
STR_SAVE_PROGRESS_FAILED: "Não foi possível salvar o progresso"
|
||||||
STR_SECTION_PREFIX: "Seção"
|
STR_SECTION_PREFIX: "Seção "
|
||||||
STR_UPLOAD: "Enviar"
|
STR_UPLOAD: "Enviar"
|
||||||
STR_BOOK_S_STYLE: "Estilo do livro"
|
STR_BOOK_S_STYLE: "Estilo do livro"
|
||||||
STR_EMBEDDED_STYLE: "Estilo embutido"
|
STR_EMBEDDED_STYLE: "Estilo embutido"
|
||||||
STR_FOCUS_READING: "Leitura focada"
|
STR_FOCUS_READING: "Leitura focada"
|
||||||
STR_OPDS_SERVER_URL: "URL do servidor OPDS"
|
STR_OPDS_SERVER_URL: "URL do servidor OPDS"
|
||||||
|
STR_PWR_BTN_FOOTNOTE_BACK: "Retorno rápido de notas de rodapé"
|
||||||
|
STR_SET_SLEEP_COVER: "Definir capa"
|
||||||
|
STR_FOOTNOTES: "Notas de rodapé"
|
||||||
|
STR_NO_FOOTNOTES: "Nenhuma nota de rodapé nesta página"
|
||||||
|
STR_LINK: "[link]"
|
||||||
STR_SCREENSHOT_BUTTON: "Capturar tela"
|
STR_SCREENSHOT_BUTTON: "Capturar tela"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Nunca"
|
STR_SLEEP_NEVER: "Nunca"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Esq/Dir: 1 min Cima/Baixo: 5 min"
|
STR_STEP_HINT_FRONT: "Botões frontais:"
|
||||||
|
STR_STEP_HINT_SIDE: "Botões laterais:"
|
||||||
|
STR_ADD_SERVER: "Adicionar Servidor"
|
||||||
|
STR_SERVER_NAME: "Nome do Servidor"
|
||||||
|
STR_NO_SERVERS: "Nenhum servidor OPDS configurado"
|
||||||
|
STR_DELETE_SERVER: "Excluir Servidor"
|
||||||
|
STR_OPDS_SERVERS: "Servidores OPDS"
|
||||||
|
STR_AUTO_TURN_ENABLED: "Virada automática ativada: "
|
||||||
|
STR_AUTO_TURN_PAGES_PER_MIN: "Virada automática (páginas por minuto)"
|
||||||
|
STR_MANAGE_FONTS: "Gerenciar fontes"
|
||||||
|
STR_FONT_BROWSER: "Navegador de fontes"
|
||||||
|
STR_LOADING_FONT_LIST: "Carregando lista de fontes..."
|
||||||
|
STR_NO_FONTS_AVAILABLE: "Nenhuma fonte disponível"
|
||||||
|
STR_FONT_INSTALLED: "Fonte instalada!"
|
||||||
|
STR_FONT_INSTALL_FAILED: "Falha na instalação da fonte"
|
||||||
|
STR_INSTALLED: "Instalada"
|
||||||
|
STR_DOWNLOAD_ALL: "Baixar tudo"
|
||||||
|
STR_UPDATE_ALL: "Atualizar tudo"
|
||||||
|
STR_UPDATE_AVAILABLE: "Atualizar"
|
||||||
|
STR_CRASH_TITLE: "Falha do sistema"
|
||||||
|
STR_CRASH_DESCRIPTION: "Um relatório detalhado foi salvo em crash_report.txt. Por favor, inclua este arquivo no seu relatório de erro."
|
||||||
|
STR_CRASH_REASON: "Motivo da falha:"
|
||||||
|
STR_CRASH_NO_REASON: "(Nenhum motivo registrado)"
|
||||||
STR_TILT_PAGE_TURN: "Virar página por inclinação"
|
STR_TILT_PAGE_TURN: "Virar página por inclinação"
|
||||||
|
STR_KB_HINT_MOVE_CURSOR: "Pressione ESQ ou DIR para mover o cursor"
|
||||||
|
STR_KB_HINT_RETURN_CURSOR: "Pressione ESQ para retornar à posição do cursor"
|
||||||
|
STR_KB_HINT_HIDE_PASSWORD: "Segure DIR e pressione [***] para ocultar a senha"
|
||||||
|
STR_KB_HINT_SHOW_PASSWORD: "Segure DIR e pressione [abc] para exibir a senha"
|
||||||
|
STR_KB_HINT_TOGGLE_HIDE_PASSWORD: "Pressione [***] para ocultar a senha"
|
||||||
|
STR_KB_HINT_TOGGLE_SHOW_PASSWORD: "Pressione [abc] para exibir a senha"
|
||||||
|
STR_KB_HINT_EDIT_ENTRY: "Segure CIMA para editar a entrada"
|
||||||
|
STR_KB_TIPS: "Dicas:"
|
||||||
|
STR_KB_HINT_RETURN_KEYBOARD: "Pressione BAIXO para retornar ao teclado"
|
||||||
|
STR_KB_HINT_EXIT_URL_MODE: "Pressione ABC para sair do modo URL"
|
||||||
|
STR_KB_HINT_CLEAR_TEXT: "Segure DEL para limpar todo o texto"
|
||||||
|
STR_KB_HINT_SECONDARY_CHAR: "Segure SELECT para caractere secundário"
|
||||||
|
STR_KB_HINT_UPPER_SECONDARY: "Segure SELECT para MAIÚSCULO ou caractere secundário"
|
||||||
|
STR_KB_HINT_LOWER_SECONDARY: "Segure SELECT para minúsculo ou caractere secundário"
|
||||||
|
STR_KB_HINT_URL_SNIPPETS: "Pressione URL para atalhos"
|
||||||
|
STR_SD_FIRMWARE_UPDATE: "Atualização de firmware via cartão SD"
|
||||||
|
STR_SELECT_FIRMWARE_FILE: "Selecione o arquivo de firmware (.bin)"
|
||||||
|
STR_NO_BIN_FILES: "Nenhum arquivo .bin encontrado"
|
||||||
|
STR_VALIDATING_FIRMWARE: "Validando firmware..."
|
||||||
|
STR_INVALID_FIRMWARE: "Arquivo de firmware inválido"
|
||||||
|
STR_FIRMWARE_TOO_LARGE: "Firmware grande demais para a partição"
|
||||||
|
STR_FIRMWARE_TOO_SMALL: "Arquivo de firmware pequeno demais"
|
||||||
|
STR_FIRMWARE_UPDATE_PROMPT: "Atualizar firmware?"
|
||||||
|
STR_FIRMWARE_FILE_OPEN_FAILED: "Não foi possível abrir o arquivo"
|
||||||
|
STR_FIRMWARE_WRITE_FAILED: "Falha na gravação do firmware"
|
||||||
|
STR_FIRMWARE_UPDATE_DO_NOT_POWER_OFF: "Não desligue o dispositivo!"
|
||||||
|
STR_RECOVERY_MODE: "Modo de Recuperação"
|
||||||
|
STR_RECOVERY_MODE_HINT: "Coloque o arquivo firmware.bin na raiz do cartão SD e selecione-o"
|
||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Mod ecran de repaus cu copertă"
|
|||||||
STR_HIDE_BATTERY: "Ascunde procentul bateriei"
|
STR_HIDE_BATTERY: "Ascunde procentul bateriei"
|
||||||
STR_EXTRA_SPACING: "Spaţiere suplimentară între paragrafe"
|
STR_EXTRA_SPACING: "Spaţiere suplimentară între paragrafe"
|
||||||
STR_TEXT_AA: "Anti-Aliasing text"
|
STR_TEXT_AA: "Anti-Aliasing text"
|
||||||
|
STR_TEXT_AA_FULL: "Complet"
|
||||||
|
STR_TEXT_AA_FAST: "Rapid"
|
||||||
STR_IMAGES: "Imagini"
|
STR_IMAGES: "Imagini"
|
||||||
STR_IMAGES_DISPLAY: "Afişare"
|
STR_IMAGES_DISPLAY: "Afişare"
|
||||||
STR_IMAGES_PLACEHOLDER: "Substituent"
|
STR_IMAGES_PLACEHOLDER: "Substituent"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Suprimare"
|
|||||||
STR_SHORT_PWR_BTN: "Apăsare scurtă întrerupător"
|
STR_SHORT_PWR_BTN: "Apăsare scurtă întrerupător"
|
||||||
STR_ORIENTATION: "Orientare lectură"
|
STR_ORIENTATION: "Orientare lectură"
|
||||||
STR_SIDE_BTN_LAYOUT: "Aspect butoane laterale (lectură)"
|
STR_SIDE_BTN_LAYOUT: "Aspect butoane laterale (lectură)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Control tactil (lectură)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientare butoane frontale"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientare butoane frontale"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Comportament buton apăsat lung"
|
STR_LONG_PRESS_BEHAVIOR: "Comportament buton apăsat lung"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Dezactivat"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Dezactivat"
|
||||||
@@ -137,6 +138,7 @@ STR_PAGE_TURN: "Răsfoire pagină"
|
|||||||
STR_PORTRAIT: "Vertical"
|
STR_PORTRAIT: "Vertical"
|
||||||
STR_LANDSCAPE_CW: "Orizontal dreapta"
|
STR_LANDSCAPE_CW: "Orizontal dreapta"
|
||||||
STR_INVERTED: "Invers"
|
STR_INVERTED: "Invers"
|
||||||
|
STR_ORIENTATION_INVERTED: "Vertical 180°"
|
||||||
STR_LANDSCAPE_CCW: "Orizontal stânga"
|
STR_LANDSCAPE_CCW: "Orizontal stânga"
|
||||||
STR_PREV_NEXT: "Înainte/Înapoi"
|
STR_PREV_NEXT: "Înainte/Înapoi"
|
||||||
STR_NEXT_PREV: "Înapoi/Înainte"
|
STR_NEXT_PREV: "Înapoi/Înainte"
|
||||||
@@ -188,6 +190,9 @@ STR_HOME: "« Acasă"
|
|||||||
STR_SELECT: "Selectează"
|
STR_SELECT: "Selectează"
|
||||||
STR_SELECTED: "Selectat"
|
STR_SELECTED: "Selectat"
|
||||||
STR_TOGGLE: "Schimbă"
|
STR_TOGGLE: "Schimbă"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Comută marcajul"
|
||||||
|
STR_BOOKMARK_REMOVED: "Marcaj eliminat."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Țineți apăsat Deschideți pentru a șterge"
|
||||||
STR_CONFIRM: "Confirmă"
|
STR_CONFIRM: "Confirmă"
|
||||||
STR_CANCEL: "Anulare"
|
STR_CANCEL: "Anulare"
|
||||||
STR_CONNECT: "Conectare"
|
STR_CONNECT: "Conectare"
|
||||||
@@ -263,7 +268,6 @@ STR_CHAPTER_PREFIX: "Capitol: "
|
|||||||
STR_PAGES_SEPARATOR: " pagini | "
|
STR_PAGES_SEPARATOR: " pagini | "
|
||||||
STR_BOOK_PREFIX: "Carte: "
|
STR_BOOK_PREFIX: "Carte: "
|
||||||
STR_CALIBRE_URL_HINT: "Pentru Calibre, adăugaţi /opds la URL"
|
STR_CALIBRE_URL_HINT: "Pentru Calibre, adăugaţi /opds la URL"
|
||||||
STR_PERCENT_STEP_HINT: "Stânga/Dreapta: 1% Sus/Jos: 10%"
|
|
||||||
STR_SYNCING_TIME: "Timp de sincronizare..."
|
STR_SYNCING_TIME: "Timp de sincronizare..."
|
||||||
STR_CALC_HASH: "Calcularea hash-ului documentului..."
|
STR_CALC_HASH: "Calcularea hash-ului documentului..."
|
||||||
STR_HASH_FAILED: "Eşec la calcularea hash-ului documentului"
|
STR_HASH_FAILED: "Eşec la calcularea hash-ului documentului"
|
||||||
@@ -295,7 +299,8 @@ STR_NO_FOOTNOTES: "Nicio notă de subsol"
|
|||||||
STR_LINK: "[link]"
|
STR_LINK: "[link]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Niciodată"
|
STR_SLEEP_NEVER: "Niciodată"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Stânga/Dreapta: 1 min Sus/Jos: 5 min"
|
STR_STEP_HINT_FRONT: "Butoane frontale:"
|
||||||
|
STR_STEP_HINT_SIDE: "Butoane laterale:"
|
||||||
STR_SCREENSHOT_BUTTON: "Captură ecran"
|
STR_SCREENSHOT_BUTTON: "Captură ecran"
|
||||||
STR_AUTO_TURN_ENABLED: "Răsfoire automată: "
|
STR_AUTO_TURN_ENABLED: "Răsfoire automată: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Pagini pe minut"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Pagini pe minut"
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ STR_SLEEP_COVER_MODE: "Режим обложки сна"
|
|||||||
STR_HIDE_BATTERY: "Скрыть % батареи"
|
STR_HIDE_BATTERY: "Скрыть % батареи"
|
||||||
STR_EXTRA_SPACING: "Доп. интервал абзаца"
|
STR_EXTRA_SPACING: "Доп. интервал абзаца"
|
||||||
STR_TEXT_AA: "Сглаживание текста"
|
STR_TEXT_AA: "Сглаживание текста"
|
||||||
|
STR_TEXT_AA_FULL: "Полное"
|
||||||
|
STR_TEXT_AA_FAST: "Быстрое"
|
||||||
STR_IMAGES: "Изображения"
|
STR_IMAGES: "Изображения"
|
||||||
STR_IMAGES_DISPLAY: "Показать"
|
STR_IMAGES_DISPLAY: "Показать"
|
||||||
STR_IMAGES_PLACEHOLDER: "Заглушки"
|
STR_IMAGES_PLACEHOLDER: "Заглушки"
|
||||||
@@ -73,7 +75,6 @@ STR_IMAGES_SUPPRESS: "Скрыть"
|
|||||||
STR_SHORT_PWR_BTN: "Короткое нажатие PWR"
|
STR_SHORT_PWR_BTN: "Короткое нажатие PWR"
|
||||||
STR_ORIENTATION: "Ориентация чтения"
|
STR_ORIENTATION: "Ориентация чтения"
|
||||||
STR_SIDE_BTN_LAYOUT: "Боковые кнопки"
|
STR_SIDE_BTN_LAYOUT: "Боковые кнопки"
|
||||||
STR_TOUCH_READER_CONTROLS: "Сенсорное управление чтением"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Ориентировать передние кнопки"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Ориентировать передние кнопки"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Долгое нажатие"
|
STR_LONG_PRESS_BEHAVIOR: "Долгое нажатие"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Ничего"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Ничего"
|
||||||
@@ -141,6 +142,7 @@ STR_FORCE_REFRESH: "Обновление экрана"
|
|||||||
STR_PORTRAIT: "Портрет"
|
STR_PORTRAIT: "Портрет"
|
||||||
STR_LANDSCAPE_CW: "Ландшафт (CW)"
|
STR_LANDSCAPE_CW: "Ландшафт (CW)"
|
||||||
STR_INVERTED: "Инверсия"
|
STR_INVERTED: "Инверсия"
|
||||||
|
STR_ORIENTATION_INVERTED: "Портрет 180°"
|
||||||
STR_LANDSCAPE_CCW: "Ландшафт (CCW)"
|
STR_LANDSCAPE_CCW: "Ландшафт (CCW)"
|
||||||
STR_PREV_NEXT: "Назад/Вперёд"
|
STR_PREV_NEXT: "Назад/Вперёд"
|
||||||
STR_NEXT_PREV: "Вперёд/Назад"
|
STR_NEXT_PREV: "Вперёд/Назад"
|
||||||
@@ -181,8 +183,7 @@ STR_DOWNLOADING: "Загрузка..."
|
|||||||
STR_DOWNLOAD_FAILED: "Ошибка загрузки"
|
STR_DOWNLOAD_FAILED: "Ошибка загрузки"
|
||||||
STR_ERROR_MSG: "Ошибка:"
|
STR_ERROR_MSG: "Ошибка:"
|
||||||
STR_UNNAMED: "Без имени"
|
STR_UNNAMED: "Без имени"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Удерживайте ОТКРЫТЬ для удаления закладки"
|
STR_HOLD_OPEN_TO_DELETE: "Удерживайте Открыть для удаления"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Удерживайте ВЫБРАТЬ для добавления закладки"
|
|
||||||
STR_NO_SERVER_URL: "URL сервера не настроен"
|
STR_NO_SERVER_URL: "URL сервера не настроен"
|
||||||
STR_FETCH_FEED_FAILED: "Не удалось получить ленту"
|
STR_FETCH_FEED_FAILED: "Не удалось получить ленту"
|
||||||
STR_PARSE_FEED_FAILED: "Не удалось обработать ленту"
|
STR_PARSE_FEED_FAILED: "Не удалось обработать ленту"
|
||||||
@@ -200,6 +201,7 @@ STR_HOME: "« Главная"
|
|||||||
STR_SELECT: "Выбрать"
|
STR_SELECT: "Выбрать"
|
||||||
STR_SELECTED: "Выбран"
|
STR_SELECTED: "Выбран"
|
||||||
STR_TOGGLE: "Выбор"
|
STR_TOGGLE: "Выбор"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Переключить закладку"
|
||||||
STR_CONFIRM: "Подтв."
|
STR_CONFIRM: "Подтв."
|
||||||
STR_CANCEL: "Отмена"
|
STR_CANCEL: "Отмена"
|
||||||
STR_CONNECT: "Подкл."
|
STR_CONNECT: "Подкл."
|
||||||
@@ -262,6 +264,7 @@ STR_SUNLIGHT_FADING_FIX: "Компенсация выцветания"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Переназначить передние кнопки"
|
STR_REMAP_FRONT_BUTTONS: "Переназначить передние кнопки"
|
||||||
STR_BOOKMARKS: "Закладки"
|
STR_BOOKMARKS: "Закладки"
|
||||||
STR_BOOKMARK_ADDED: "Закладка добавлена"
|
STR_BOOKMARK_ADDED: "Закладка добавлена"
|
||||||
|
STR_BOOKMARK_REMOVED: "Закладка удалена"
|
||||||
STR_OPDS_BROWSER: "OPDS браузер"
|
STR_OPDS_BROWSER: "OPDS браузер"
|
||||||
STR_SEARCH: "Поиск"
|
STR_SEARCH: "Поиск"
|
||||||
STR_COVER_CUSTOM: "Обложка + Свой"
|
STR_COVER_CUSTOM: "Обложка + Свой"
|
||||||
@@ -297,7 +300,6 @@ STR_CHAPTER_PREFIX: "Глава: "
|
|||||||
STR_PAGES_SEPARATOR: " стр. | "
|
STR_PAGES_SEPARATOR: " стр. | "
|
||||||
STR_BOOK_PREFIX: "Книга: "
|
STR_BOOK_PREFIX: "Книга: "
|
||||||
STR_CALIBRE_URL_HINT: "Для Calibre добавьте /opds к URL"
|
STR_CALIBRE_URL_HINT: "Для Calibre добавьте /opds к URL"
|
||||||
STR_PERCENT_STEP_HINT: "Влево/Вправо: 1% Вверх/Вниз: 10%"
|
|
||||||
STR_SYNCING_TIME: "Синхронизация времени..."
|
STR_SYNCING_TIME: "Синхронизация времени..."
|
||||||
STR_CALC_HASH: "Расчёт хэша документа..."
|
STR_CALC_HASH: "Расчёт хэша документа..."
|
||||||
STR_HASH_FAILED: "Не удалось вычислить хэш документа"
|
STR_HASH_FAILED: "Не удалось вычислить хэш документа"
|
||||||
@@ -331,7 +333,8 @@ STR_LINK: "[ссылка]"
|
|||||||
STR_SCREENSHOT_BUTTON: "Сделать снимок экрана"
|
STR_SCREENSHOT_BUTTON: "Сделать снимок экрана"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u мин"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u мин"
|
||||||
STR_SLEEP_NEVER: "Никогда"
|
STR_SLEEP_NEVER: "Никогда"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Влево/Вправо: 1 мин Вверх/Вниз: 5 мин"
|
STR_STEP_HINT_FRONT: "Передние кнопки:"
|
||||||
|
STR_STEP_HINT_SIDE: "Боковые кнопки:"
|
||||||
STR_ADD_SERVER: "Добавить сервер"
|
STR_ADD_SERVER: "Добавить сервер"
|
||||||
STR_SERVER_NAME: "Имя сервера"
|
STR_SERVER_NAME: "Имя сервера"
|
||||||
STR_NO_SERVERS: "Нет настроенных серверов OPDS"
|
STR_NO_SERVERS: "Нет настроенных серверов OPDS"
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ STR_SLEEP_COVER_MODE: "Obrazovka spánku – režim krytu"
|
|||||||
STR_HIDE_BATTERY: "Skryť % batérie"
|
STR_HIDE_BATTERY: "Skryť % batérie"
|
||||||
STR_EXTRA_SPACING: "Dodatočné medzery medzi odsekmi"
|
STR_EXTRA_SPACING: "Dodatočné medzery medzi odsekmi"
|
||||||
STR_TEXT_AA: "Vyhladzovanie textu"
|
STR_TEXT_AA: "Vyhladzovanie textu"
|
||||||
|
STR_TEXT_AA_FULL: "Plné"
|
||||||
|
STR_TEXT_AA_FAST: "Rýchle"
|
||||||
STR_IMAGES: "Obrázky"
|
STR_IMAGES: "Obrázky"
|
||||||
STR_IMAGES_DISPLAY: "Zobraz"
|
STR_IMAGES_DISPLAY: "Zobraz"
|
||||||
STR_IMAGES_PLACEHOLDER: "Rezervované miesto"
|
STR_IMAGES_PLACEHOLDER: "Rezervované miesto"
|
||||||
@@ -73,7 +75,6 @@ STR_IMAGES_SUPPRESS: "Potlačiť"
|
|||||||
STR_SHORT_PWR_BTN: "Krátke stlačenie tlačidla napájania"
|
STR_SHORT_PWR_BTN: "Krátke stlačenie tlačidla napájania"
|
||||||
STR_ORIENTATION: "Orientácia čítania"
|
STR_ORIENTATION: "Orientácia čítania"
|
||||||
STR_SIDE_BTN_LAYOUT: "Rozloženie bočných tlačidiel (čítačka)"
|
STR_SIDE_BTN_LAYOUT: "Rozloženie bočných tlačidiel (čítačka)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Dotykové ovládanie čítačky"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Prispôsobiť predné tlačidlá orientácii"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Prispôsobiť predné tlačidlá orientácii"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Správanie pri dlhom stlačení tlačidla"
|
STR_LONG_PRESS_BEHAVIOR: "Správanie pri dlhom stlačení tlačidla"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "VYP"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "VYP"
|
||||||
@@ -138,7 +139,8 @@ STR_PAGE_TURN: "Otáčanie stránok"
|
|||||||
STR_FORCE_REFRESH: "Obnoviť obrazovku"
|
STR_FORCE_REFRESH: "Obnoviť obrazovku"
|
||||||
STR_PORTRAIT: "Na výšku"
|
STR_PORTRAIT: "Na výšku"
|
||||||
STR_LANDSCAPE_CW: "Na šírku v smere hodinových ručičiek"
|
STR_LANDSCAPE_CW: "Na šírku v smere hodinových ručičiek"
|
||||||
STR_INVERTED: "Obrátený"
|
STR_INVERTED: "Invertovaný"
|
||||||
|
STR_ORIENTATION_INVERTED: "Na výšku 180°"
|
||||||
STR_LANDSCAPE_CCW: "Na šírku proti smeru hodinových ručičiek"
|
STR_LANDSCAPE_CCW: "Na šírku proti smeru hodinových ručičiek"
|
||||||
STR_PREV_NEXT: "Predchádzajúca/Nasledujúca"
|
STR_PREV_NEXT: "Predchádzajúca/Nasledujúca"
|
||||||
STR_NEXT_PREV: "Nasledujúca/Predchádzajúca"
|
STR_NEXT_PREV: "Nasledujúca/Predchádzajúca"
|
||||||
@@ -177,8 +179,7 @@ STR_DOWNLOADING: "Sťahovanie..."
|
|||||||
STR_DOWNLOAD_FAILED: "Sťahovanie zlyhalo"
|
STR_DOWNLOAD_FAILED: "Sťahovanie zlyhalo"
|
||||||
STR_ERROR_MSG: "Chyba:"
|
STR_ERROR_MSG: "Chyba:"
|
||||||
STR_UNNAMED: "Nepomenované"
|
STR_UNNAMED: "Nepomenované"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Podrž potvrdiť pre vymazanie"
|
STR_HOLD_OPEN_TO_DELETE: "Podržte Otvoriť pre vymazanie"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Podrž tlačidlo Potvrdiť pre vytvorenie záložky."
|
|
||||||
STR_NO_SERVER_URL: "Nie je nakonfigurovaná URL adresa servera"
|
STR_NO_SERVER_URL: "Nie je nakonfigurovaná URL adresa servera"
|
||||||
STR_FETCH_FEED_FAILED: "Načítanie kanála zlyhalo"
|
STR_FETCH_FEED_FAILED: "Načítanie kanála zlyhalo"
|
||||||
STR_PARSE_FEED_FAILED: "Spracovanie kanála zlyhalo"
|
STR_PARSE_FEED_FAILED: "Spracovanie kanála zlyhalo"
|
||||||
@@ -196,6 +197,7 @@ STR_HOME: "« Domov"
|
|||||||
STR_SELECT: "Vybrať"
|
STR_SELECT: "Vybrať"
|
||||||
STR_SELECTED: "Vybrané"
|
STR_SELECTED: "Vybrané"
|
||||||
STR_TOGGLE: "Prepnúť"
|
STR_TOGGLE: "Prepnúť"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Prepnúť záložku"
|
||||||
STR_CONFIRM: "Potvrdiť"
|
STR_CONFIRM: "Potvrdiť"
|
||||||
STR_CANCEL: "Zrušiť"
|
STR_CANCEL: "Zrušiť"
|
||||||
STR_CONNECT: "Pripojiť"
|
STR_CONNECT: "Pripojiť"
|
||||||
@@ -258,6 +260,7 @@ STR_SUNLIGHT_FADING_FIX: "Oprava blednutia na slnku"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Premapovať predné tlačidlá"
|
STR_REMAP_FRONT_BUTTONS: "Premapovať predné tlačidlá"
|
||||||
STR_BOOKMARKS: "Záložky"
|
STR_BOOKMARKS: "Záložky"
|
||||||
STR_BOOKMARK_ADDED: "Záložka pridaná."
|
STR_BOOKMARK_ADDED: "Záložka pridaná."
|
||||||
|
STR_BOOKMARK_REMOVED: "Záložka odstránená."
|
||||||
STR_OPDS_BROWSER: "Prehliadač OPDS"
|
STR_OPDS_BROWSER: "Prehliadač OPDS"
|
||||||
STR_SEARCH: "Hľadať"
|
STR_SEARCH: "Hľadať"
|
||||||
STR_COVER_CUSTOM: "Obálka + Vlastné"
|
STR_COVER_CUSTOM: "Obálka + Vlastné"
|
||||||
@@ -293,7 +296,6 @@ STR_CHAPTER_PREFIX: "Kapitola:"
|
|||||||
STR_PAGES_SEPARATOR: "strán |"
|
STR_PAGES_SEPARATOR: "strán |"
|
||||||
STR_BOOK_PREFIX: "Kniha:"
|
STR_BOOK_PREFIX: "Kniha:"
|
||||||
STR_CALIBRE_URL_HINT: "Pre Calibre pridajte /opds na koniec URL adresy"
|
STR_CALIBRE_URL_HINT: "Pre Calibre pridajte /opds na koniec URL adresy"
|
||||||
STR_PERCENT_STEP_HINT: "Vľavo/Vpravo: 1 % Hore/Dole: 10 %"
|
|
||||||
STR_SYNCING_TIME: "Čas synchronizácie..."
|
STR_SYNCING_TIME: "Čas synchronizácie..."
|
||||||
STR_CALC_HASH: "Výpočet hashu dokumentu..."
|
STR_CALC_HASH: "Výpočet hashu dokumentu..."
|
||||||
STR_HASH_FAILED: "Nepodarilo sa vypočítať hash dokumentu"
|
STR_HASH_FAILED: "Nepodarilo sa vypočítať hash dokumentu"
|
||||||
@@ -327,7 +329,8 @@ STR_LINK: "[link]"
|
|||||||
STR_SCREENSHOT_BUTTON: "Urobiť snímku obrazovky"
|
STR_SCREENSHOT_BUTTON: "Urobiť snímku obrazovky"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Nikdy"
|
STR_SLEEP_NEVER: "Nikdy"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Vľavo/Vpravo: 1 min Hore/Dole: 5 min"
|
STR_STEP_HINT_FRONT: "Predné tlačidlá:"
|
||||||
|
STR_STEP_HINT_SIDE: "Bočné tlačidlá:"
|
||||||
STR_ADD_SERVER: "Pridať server"
|
STR_ADD_SERVER: "Pridať server"
|
||||||
STR_SERVER_NAME: "Názov servera"
|
STR_SERVER_NAME: "Názov servera"
|
||||||
STR_NO_SERVERS: "Nie sú nakonfigurované žiadne OPDS servery"
|
STR_NO_SERVERS: "Nie sú nakonfigurované žiadne OPDS servery"
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Način naslovnice v spanju"
|
|||||||
STR_HIDE_BATTERY: "Skrij % baterije"
|
STR_HIDE_BATTERY: "Skrij % baterije"
|
||||||
STR_EXTRA_SPACING: "Dodaten razmik med odstavki"
|
STR_EXTRA_SPACING: "Dodaten razmik med odstavki"
|
||||||
STR_TEXT_AA: "Glajenje besedila (AA)"
|
STR_TEXT_AA: "Glajenje besedila (AA)"
|
||||||
|
STR_TEXT_AA_FULL: "Polno"
|
||||||
|
STR_TEXT_AA_FAST: "Hitro"
|
||||||
STR_IMAGES: "Slike"
|
STR_IMAGES: "Slike"
|
||||||
STR_IMAGES_DISPLAY: "Prikaži"
|
STR_IMAGES_DISPLAY: "Prikaži"
|
||||||
STR_IMAGES_PLACEHOLDER: "Oznaka mesta"
|
STR_IMAGES_PLACEHOLDER: "Oznaka mesta"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Zatdi"
|
|||||||
STR_SHORT_PWR_BTN: "Kratek pritisk na gumb za vklop"
|
STR_SHORT_PWR_BTN: "Kratek pritisk na gumb za vklop"
|
||||||
STR_ORIENTATION: "Orientacija branja"
|
STR_ORIENTATION: "Orientacija branja"
|
||||||
STR_SIDE_BTN_LAYOUT: "Razpored stranskih gumbov"
|
STR_SIDE_BTN_LAYOUT: "Razpored stranskih gumbov"
|
||||||
STR_TOUCH_READER_CONTROLS: "Dotikalni nadzor (bralnik)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Usmeri sprednje gumbe"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Usmeri sprednje gumbe"
|
||||||
STR_LONG_PRESS_SKIP: "Dolgi pritisk za preskok poglavja"
|
STR_LONG_PRESS_SKIP: "Dolgi pritisk za preskok poglavja"
|
||||||
STR_FONT_PREVIEW_TEXT: "V kožuščku hudobnega fanta stopiclja mizar"
|
STR_FONT_PREVIEW_TEXT: "V kožuščku hudobnega fanta stopiclja mizar"
|
||||||
@@ -133,7 +134,8 @@ STR_SLEEP: "Spanje"
|
|||||||
STR_PAGE_TURN: "Obračanje strani"
|
STR_PAGE_TURN: "Obračanje strani"
|
||||||
STR_PORTRAIT: "Pokončno"
|
STR_PORTRAIT: "Pokončno"
|
||||||
STR_LANDSCAPE_CW: "Ležeče (v smeri urinega kazalca)"
|
STR_LANDSCAPE_CW: "Ležeče (v smeri urinega kazalca)"
|
||||||
STR_INVERTED: "Obrnjeno"
|
STR_INVERTED: "Invertirano"
|
||||||
|
STR_ORIENTATION_INVERTED: "Pokončno 180°"
|
||||||
STR_LANDSCAPE_CCW: "Ležeče (proti smeri urinega kazalca)"
|
STR_LANDSCAPE_CCW: "Ležeče (proti smeri urinega kazalca)"
|
||||||
STR_PREV_NEXT: "Nazaj/Naprej"
|
STR_PREV_NEXT: "Nazaj/Naprej"
|
||||||
STR_NEXT_PREV: "Naprej/Nazaj"
|
STR_NEXT_PREV: "Naprej/Nazaj"
|
||||||
@@ -185,6 +187,9 @@ STR_HOME: "« Domov"
|
|||||||
STR_SELECT: "Izberi"
|
STR_SELECT: "Izberi"
|
||||||
STR_SELECTED: "Izbrano"
|
STR_SELECTED: "Izbrano"
|
||||||
STR_TOGGLE: "Preklopi"
|
STR_TOGGLE: "Preklopi"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Preklopi zaznamek"
|
||||||
|
STR_BOOKMARK_REMOVED: "Zaznamek odstranjen."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Držite Odpri za brisanje"
|
||||||
STR_CONFIRM: "Potrdi"
|
STR_CONFIRM: "Potrdi"
|
||||||
STR_CANCEL: "Prekliči"
|
STR_CANCEL: "Prekliči"
|
||||||
STR_CONNECT: "Poveži"
|
STR_CONNECT: "Poveži"
|
||||||
@@ -260,7 +265,6 @@ STR_CHAPTER_PREFIX: "Poglavje: "
|
|||||||
STR_PAGES_SEPARATOR: " strani | "
|
STR_PAGES_SEPARATOR: " strani | "
|
||||||
STR_BOOK_PREFIX: "Knjiga: "
|
STR_BOOK_PREFIX: "Knjiga: "
|
||||||
STR_CALIBRE_URL_HINT: "Za Calibre dodaj /opds svojemu URL-ju"
|
STR_CALIBRE_URL_HINT: "Za Calibre dodaj /opds svojemu URL-ju"
|
||||||
STR_PERCENT_STEP_HINT: "Levo/desno: 1% Gor/dol: 10%"
|
|
||||||
STR_SYNCING_TIME: "Sinhronizacija časa..."
|
STR_SYNCING_TIME: "Sinhronizacija časa..."
|
||||||
STR_CALC_HASH: "Izračunavanje podpisa dokumenta..."
|
STR_CALC_HASH: "Izračunavanje podpisa dokumenta..."
|
||||||
STR_HASH_FAILED: "Izračun podpisa dokumenta ni uspel"
|
STR_HASH_FAILED: "Izračun podpisa dokumenta ni uspel"
|
||||||
@@ -292,7 +296,8 @@ STR_NO_FOOTNOTES: "Na tej strani ni opomb"
|
|||||||
STR_LINK: "[povezava]"
|
STR_LINK: "[povezava]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Nikoli"
|
STR_SLEEP_NEVER: "Nikoli"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Levo/desno: 1 min Gor/dol: 5 min"
|
STR_STEP_HINT_FRONT: "Sprednji gumbi:"
|
||||||
|
STR_STEP_HINT_SIDE: "Stranski gumbi:"
|
||||||
STR_SCREENSHOT_BUTTON: "Naredi posnetek zaslona"
|
STR_SCREENSHOT_BUTTON: "Naredi posnetek zaslona"
|
||||||
STR_AUTO_TURN_ENABLED: "Samodejno obračanje: "
|
STR_AUTO_TURN_ENABLED: "Samodejno obračanje: "
|
||||||
STR_AUTO_TURN_PAGES_PER_MIN: "Samodejno obračanje (strani na minuto)"
|
STR_AUTO_TURN_PAGES_PER_MIN: "Samodejno obračanje (strani na minuto)"
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ STR_SLEEP_COVER_MODE: "Modo de pantalla de suspensión"
|
|||||||
STR_HIDE_BATTERY: "Ocultar % de batería"
|
STR_HIDE_BATTERY: "Ocultar % de batería"
|
||||||
STR_EXTRA_SPACING: "Espaciado entre párrafos"
|
STR_EXTRA_SPACING: "Espaciado entre párrafos"
|
||||||
STR_TEXT_AA: "Suavizado de texto"
|
STR_TEXT_AA: "Suavizado de texto"
|
||||||
|
STR_TEXT_AA_FULL: "Completo"
|
||||||
|
STR_TEXT_AA_FAST: "Rápido"
|
||||||
STR_IMAGES: "Imágenes"
|
STR_IMAGES: "Imágenes"
|
||||||
STR_IMAGES_DISPLAY: "Mostrar"
|
STR_IMAGES_DISPLAY: "Mostrar"
|
||||||
STR_IMAGES_PLACEHOLDER: "Reemplazar"
|
STR_IMAGES_PLACEHOLDER: "Reemplazar"
|
||||||
@@ -72,7 +74,6 @@ STR_IMAGES_SUPPRESS: "Ocultar"
|
|||||||
STR_SHORT_PWR_BTN: "Toque corto del encendido"
|
STR_SHORT_PWR_BTN: "Toque corto del encendido"
|
||||||
STR_ORIENTATION: "Orientación"
|
STR_ORIENTATION: "Orientación"
|
||||||
STR_SIDE_BTN_LAYOUT: "Función botones laterales (lector)"
|
STR_SIDE_BTN_LAYOUT: "Función botones laterales (lector)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Controles táctiles (lector)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientar botones frontales"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientar botones frontales"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Al mantener pulsado un botón"
|
STR_LONG_PRESS_BEHAVIOR: "Al mantener pulsado un botón"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "No hacer nada"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "No hacer nada"
|
||||||
@@ -139,6 +140,7 @@ STR_FORCE_REFRESH: "Refrescar pant."
|
|||||||
STR_PORTRAIT: "Vertical"
|
STR_PORTRAIT: "Vertical"
|
||||||
STR_LANDSCAPE_CW: "Horizontal (horario)"
|
STR_LANDSCAPE_CW: "Horizontal (horario)"
|
||||||
STR_INVERTED: "Invertido"
|
STR_INVERTED: "Invertido"
|
||||||
|
STR_ORIENTATION_INVERTED: "Al revés"
|
||||||
STR_LANDSCAPE_CCW: "Horizontal (antihorario)"
|
STR_LANDSCAPE_CCW: "Horizontal (antihorario)"
|
||||||
STR_PREV_NEXT: "Ant./Sig."
|
STR_PREV_NEXT: "Ant./Sig."
|
||||||
STR_NEXT_PREV: "Sig./Ant."
|
STR_NEXT_PREV: "Sig./Ant."
|
||||||
@@ -179,8 +181,7 @@ STR_DOWNLOADING: "Descargando..."
|
|||||||
STR_DOWNLOAD_FAILED: "Fallo de descarga"
|
STR_DOWNLOAD_FAILED: "Fallo de descarga"
|
||||||
STR_ERROR_MSG: "Error:"
|
STR_ERROR_MSG: "Error:"
|
||||||
STR_UNNAMED: "Sin nombre"
|
STR_UNNAMED: "Sin nombre"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Mantenga pulsado Confirmar para borrar"
|
STR_HOLD_OPEN_TO_DELETE: "Mantenga pulsado Abrir para borrar"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Mantenga pulsado Confirmar en el lector para crear un marcador."
|
|
||||||
STR_NO_SERVER_URL: "No se configuró URL de servidor"
|
STR_NO_SERVER_URL: "No se configuró URL de servidor"
|
||||||
STR_FETCH_FEED_FAILED: "Fallo al obtener el feed"
|
STR_FETCH_FEED_FAILED: "Fallo al obtener el feed"
|
||||||
STR_PARSE_FEED_FAILED: "Fallo al procesar el feed"
|
STR_PARSE_FEED_FAILED: "Fallo al procesar el feed"
|
||||||
@@ -198,6 +199,7 @@ STR_HOME: "« Inicio"
|
|||||||
STR_SELECT: "Selecc."
|
STR_SELECT: "Selecc."
|
||||||
STR_SELECTED: "Seleccionado"
|
STR_SELECTED: "Seleccionado"
|
||||||
STR_TOGGLE: "Cambiar"
|
STR_TOGGLE: "Cambiar"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Alternar marcador"
|
||||||
STR_CONFIRM: "Confirmar"
|
STR_CONFIRM: "Confirmar"
|
||||||
STR_CANCEL: "Cancelar"
|
STR_CANCEL: "Cancelar"
|
||||||
STR_CONNECT: "Conectar"
|
STR_CONNECT: "Conectar"
|
||||||
@@ -261,6 +263,7 @@ STR_QUICK_RESUME_TIMEOUT: "Reanudación rápida tras tiempo"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Reconfigurar botones frontales"
|
STR_REMAP_FRONT_BUTTONS: "Reconfigurar botones frontales"
|
||||||
STR_BOOKMARKS: "Marcadores"
|
STR_BOOKMARKS: "Marcadores"
|
||||||
STR_BOOKMARK_ADDED: "Marcador añadido."
|
STR_BOOKMARK_ADDED: "Marcador añadido."
|
||||||
|
STR_BOOKMARK_REMOVED: "Marcador eliminado."
|
||||||
STR_OPDS_BROWSER: "Navegador OPDS"
|
STR_OPDS_BROWSER: "Navegador OPDS"
|
||||||
STR_SEARCH: "Buscar"
|
STR_SEARCH: "Buscar"
|
||||||
STR_COVER_CUSTOM: "Portada + Pers."
|
STR_COVER_CUSTOM: "Portada + Pers."
|
||||||
@@ -296,7 +299,6 @@ STR_CHAPTER_PREFIX: "Cap.: "
|
|||||||
STR_PAGES_SEPARATOR: " pág. | "
|
STR_PAGES_SEPARATOR: " pág. | "
|
||||||
STR_BOOK_PREFIX: "Libro: "
|
STR_BOOK_PREFIX: "Libro: "
|
||||||
STR_CALIBRE_URL_HINT: "Para Calibre, agregue /opds a su URL"
|
STR_CALIBRE_URL_HINT: "Para Calibre, agregue /opds a su URL"
|
||||||
STR_PERCENT_STEP_HINT: "Izq./Dcha.: 1% | Subir/Bajar: 10%"
|
|
||||||
STR_SYNCING_TIME: "Tiempo de sincronización..."
|
STR_SYNCING_TIME: "Tiempo de sincronización..."
|
||||||
STR_CALC_HASH: "Calculando hash del documento..."
|
STR_CALC_HASH: "Calculando hash del documento..."
|
||||||
STR_HASH_FAILED: "No se pudo calcular el hash del documento"
|
STR_HASH_FAILED: "No se pudo calcular el hash del documento"
|
||||||
@@ -330,7 +332,8 @@ STR_NO_FOOTNOTES: "No hay notas al pie de esta página"
|
|||||||
STR_LINK: "[enlace]"
|
STR_LINK: "[enlace]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min."
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min."
|
||||||
STR_SLEEP_NEVER: "Nunca"
|
STR_SLEEP_NEVER: "Nunca"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Izq./Dcha.: 1 min. Subir/Bajar: 5 min."
|
STR_STEP_HINT_FRONT: "Botones frontales:"
|
||||||
|
STR_STEP_HINT_SIDE: "Botones laterales:"
|
||||||
STR_SCREENSHOT_BUTTON: "Tomar captura de pantalla"
|
STR_SCREENSHOT_BUTTON: "Tomar captura de pantalla"
|
||||||
STR_ADD_SERVER: "Agregar servidor"
|
STR_ADD_SERVER: "Agregar servidor"
|
||||||
STR_SERVER_NAME: "Nombre de servidor"
|
STR_SERVER_NAME: "Nombre de servidor"
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ STR_SLEEP_COVER_MODE: "Viloskärmens omslagsläge"
|
|||||||
STR_HIDE_BATTERY: "Dölj batteriprocent"
|
STR_HIDE_BATTERY: "Dölj batteriprocent"
|
||||||
STR_EXTRA_SPACING: "Extra paragrafmellanrum"
|
STR_EXTRA_SPACING: "Extra paragrafmellanrum"
|
||||||
STR_TEXT_AA: "Textkantutjämning"
|
STR_TEXT_AA: "Textkantutjämning"
|
||||||
|
STR_TEXT_AA_FULL: "Full"
|
||||||
|
STR_TEXT_AA_FAST: "Snabb"
|
||||||
STR_IMAGES: "Bilder"
|
STR_IMAGES: "Bilder"
|
||||||
STR_IMAGES_DISPLAY: "Visa"
|
STR_IMAGES_DISPLAY: "Visa"
|
||||||
STR_IMAGES_PLACEHOLDER: "Platshållare"
|
STR_IMAGES_PLACEHOLDER: "Platshållare"
|
||||||
@@ -73,7 +75,6 @@ STR_IMAGES_SUPPRESS: "Dölj"
|
|||||||
STR_SHORT_PWR_BTN: "Kort strömknappsklick"
|
STR_SHORT_PWR_BTN: "Kort strömknappsklick"
|
||||||
STR_ORIENTATION: "Läsrikting"
|
STR_ORIENTATION: "Läsrikting"
|
||||||
STR_SIDE_BTN_LAYOUT: "Sidoknappslayout (Läsare)"
|
STR_SIDE_BTN_LAYOUT: "Sidoknappslayout (Läsare)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Pekkontroller (läsare)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Rikta främre knappar"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Rikta främre knappar"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Beteende vid lång knapptryckning"
|
STR_LONG_PRESS_BEHAVIOR: "Beteende vid lång knapptryckning"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "AV"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "AV"
|
||||||
@@ -139,6 +140,7 @@ STR_FORCE_REFRESH: "Uppdatera skärmen"
|
|||||||
STR_PORTRAIT: "Porträtt"
|
STR_PORTRAIT: "Porträtt"
|
||||||
STR_LANDSCAPE_CW: "Landskap medurs"
|
STR_LANDSCAPE_CW: "Landskap medurs"
|
||||||
STR_INVERTED: "Inverterad"
|
STR_INVERTED: "Inverterad"
|
||||||
|
STR_ORIENTATION_INVERTED: "Porträtt 180°"
|
||||||
STR_LANDSCAPE_CCW: "Landskap moturs"
|
STR_LANDSCAPE_CCW: "Landskap moturs"
|
||||||
STR_PREV_NEXT: "Förra/Nästa"
|
STR_PREV_NEXT: "Förra/Nästa"
|
||||||
STR_NEXT_PREV: "Nästa/Förra"
|
STR_NEXT_PREV: "Nästa/Förra"
|
||||||
@@ -177,8 +179,7 @@ STR_DOWNLOADING: "Laddar ner…"
|
|||||||
STR_DOWNLOAD_FAILED: "Nedladdning misslyckades"
|
STR_DOWNLOAD_FAILED: "Nedladdning misslyckades"
|
||||||
STR_ERROR_MSG: "Fel:"
|
STR_ERROR_MSG: "Fel:"
|
||||||
STR_UNNAMED: "Ej namngiven"
|
STR_UNNAMED: "Ej namngiven"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Håll ned Bekräfta för att radera"
|
STR_HOLD_OPEN_TO_DELETE: "Håll ned Öppna för att radera"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Håll Bekräfta i läsaren för att skapa ett bokmärke."
|
|
||||||
STR_NO_SERVER_URL: "Ingen serveradress konfigurerad"
|
STR_NO_SERVER_URL: "Ingen serveradress konfigurerad"
|
||||||
STR_FETCH_FEED_FAILED: "Misslyckades att hämta flöde"
|
STR_FETCH_FEED_FAILED: "Misslyckades att hämta flöde"
|
||||||
STR_PARSE_FEED_FAILED: "Misslyckades att analysera flöde"
|
STR_PARSE_FEED_FAILED: "Misslyckades att analysera flöde"
|
||||||
@@ -196,6 +197,7 @@ STR_HOME: "« Hem"
|
|||||||
STR_SELECT: "Välj "
|
STR_SELECT: "Välj "
|
||||||
STR_SELECTED: "Vald"
|
STR_SELECTED: "Vald"
|
||||||
STR_TOGGLE: "Växla"
|
STR_TOGGLE: "Växla"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Växla bokmärke"
|
||||||
STR_CONFIRM: "Bekräfta"
|
STR_CONFIRM: "Bekräfta"
|
||||||
STR_CANCEL: "Avbryt"
|
STR_CANCEL: "Avbryt"
|
||||||
STR_CONNECT: "Anslut"
|
STR_CONNECT: "Anslut"
|
||||||
@@ -259,6 +261,7 @@ STR_QUICK_RESUME_TIMEOUT: "Snabb återupptagning efter timeout"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Ändra frontknappar"
|
STR_REMAP_FRONT_BUTTONS: "Ändra frontknappar"
|
||||||
STR_BOOKMARKS: "Bokmärken"
|
STR_BOOKMARKS: "Bokmärken"
|
||||||
STR_BOOKMARK_ADDED: "Bokmärke tillagt."
|
STR_BOOKMARK_ADDED: "Bokmärke tillagt."
|
||||||
|
STR_BOOKMARK_REMOVED: "Bokmärke borttaget."
|
||||||
STR_OPDS_BROWSER: "OPDS-webbläsare"
|
STR_OPDS_BROWSER: "OPDS-webbläsare"
|
||||||
STR_SEARCH: "Sök"
|
STR_SEARCH: "Sök"
|
||||||
STR_COVER_CUSTOM: "Omslag + Valfri"
|
STR_COVER_CUSTOM: "Omslag + Valfri"
|
||||||
@@ -294,7 +297,6 @@ STR_CHAPTER_PREFIX: "Kapitel:"
|
|||||||
STR_PAGES_SEPARATOR: " sidor | "
|
STR_PAGES_SEPARATOR: " sidor | "
|
||||||
STR_BOOK_PREFIX: "Bok:"
|
STR_BOOK_PREFIX: "Bok:"
|
||||||
STR_CALIBRE_URL_HINT: "För Calibre: lägg till /opds i din adress"
|
STR_CALIBRE_URL_HINT: "För Calibre: lägg till /opds i din adress"
|
||||||
STR_PERCENT_STEP_HINT: "Vänster/Höger: 1% Upp/Ner 10%"
|
|
||||||
STR_SYNCING_TIME: "Synkroniserar tid…"
|
STR_SYNCING_TIME: "Synkroniserar tid…"
|
||||||
STR_CALC_HASH: "Beräknar dokumenthash"
|
STR_CALC_HASH: "Beräknar dokumenthash"
|
||||||
STR_HASH_FAILED: "Misslyckades att beräkna dokumenthash"
|
STR_HASH_FAILED: "Misslyckades att beräkna dokumenthash"
|
||||||
@@ -327,7 +329,8 @@ STR_NO_FOOTNOTES: "Inga fotnoter på den här sidan"
|
|||||||
STR_LINK: "[länk]"
|
STR_LINK: "[länk]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Aldrig"
|
STR_SLEEP_NEVER: "Aldrig"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Vänster/Höger: 1 min Upp/Ner: 5 min"
|
STR_STEP_HINT_FRONT: "Framknappar:"
|
||||||
|
STR_STEP_HINT_SIDE: "Sidoknappar:"
|
||||||
STR_SCREENSHOT_BUTTON: "Ta en skärmdump"
|
STR_SCREENSHOT_BUTTON: "Ta en skärmdump"
|
||||||
STR_ADD_SERVER: "Lägg till server"
|
STR_ADD_SERVER: "Lägg till server"
|
||||||
STR_SERVER_NAME: "Servernamn"
|
STR_SERVER_NAME: "Servernamn"
|
||||||
|
|||||||
@@ -64,10 +64,11 @@ STR_SLEEP_COVER_MODE: "Uyku Ekranı Kapak Modu"
|
|||||||
STR_HIDE_BATTERY: "Pil Yüzdesini Gizle"
|
STR_HIDE_BATTERY: "Pil Yüzdesini Gizle"
|
||||||
STR_EXTRA_SPACING: "Ekstra Paragraf Boşluğu"
|
STR_EXTRA_SPACING: "Ekstra Paragraf Boşluğu"
|
||||||
STR_TEXT_AA: "Metin Yumuşatma (AA)"
|
STR_TEXT_AA: "Metin Yumuşatma (AA)"
|
||||||
|
STR_TEXT_AA_FULL: "Tam"
|
||||||
|
STR_TEXT_AA_FAST: "Hızlı"
|
||||||
STR_SHORT_PWR_BTN: "Kısa Güç Tuşu Tıklaması"
|
STR_SHORT_PWR_BTN: "Kısa Güç Tuşu Tıklaması"
|
||||||
STR_ORIENTATION: "Okuma Yönü"
|
STR_ORIENTATION: "Okuma Yönü"
|
||||||
STR_SIDE_BTN_LAYOUT: "Yan Tuş Dizilimi (okuyucu)"
|
STR_SIDE_BTN_LAYOUT: "Yan Tuş Dizilimi (okuyucu)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Dokunmatik okuyucu kontrolleri"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Ön düğmeleri yönlendir"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Ön düğmeleri yönlendir"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Long-press button behavior"
|
STR_LONG_PRESS_BEHAVIOR: "Long-press button behavior"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "OFF"
|
||||||
@@ -131,7 +132,8 @@ STR_SLEEP: "Uyku"
|
|||||||
STR_PAGE_TURN: "Sayfa Çevirme"
|
STR_PAGE_TURN: "Sayfa Çevirme"
|
||||||
STR_PORTRAIT: "Dikey"
|
STR_PORTRAIT: "Dikey"
|
||||||
STR_LANDSCAPE_CW: "Yatay (Saat Yönü)"
|
STR_LANDSCAPE_CW: "Yatay (Saat Yönü)"
|
||||||
STR_INVERTED: "Ters"
|
STR_INVERTED: "Negatif"
|
||||||
|
STR_ORIENTATION_INVERTED: "Dikey 180°"
|
||||||
STR_LANDSCAPE_CCW: "Yatay (Saat Yönü Tersi)"
|
STR_LANDSCAPE_CCW: "Yatay (Saat Yönü Tersi)"
|
||||||
STR_PREV_NEXT: "Önceki/Sonraki"
|
STR_PREV_NEXT: "Önceki/Sonraki"
|
||||||
STR_NEXT_PREV: "Sonraki/Önceki"
|
STR_NEXT_PREV: "Sonraki/Önceki"
|
||||||
@@ -182,6 +184,9 @@ STR_EXIT: "« Çıkış"
|
|||||||
STR_HOME: "« Ana Sayfa"
|
STR_HOME: "« Ana Sayfa"
|
||||||
STR_SELECT: "Seç"
|
STR_SELECT: "Seç"
|
||||||
STR_TOGGLE: "Değiştir"
|
STR_TOGGLE: "Değiştir"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Yer imini değiştir"
|
||||||
|
STR_BOOKMARK_REMOVED: "Yer imi kaldırıldı."
|
||||||
|
STR_HOLD_OPEN_TO_DELETE: "Silmek için Aç düğmesini basılı tutun"
|
||||||
STR_CONFIRM: "Onayla"
|
STR_CONFIRM: "Onayla"
|
||||||
STR_CANCEL: "İptal"
|
STR_CANCEL: "İptal"
|
||||||
STR_CONNECT: "Bağlan"
|
STR_CONNECT: "Bağlan"
|
||||||
@@ -238,7 +243,6 @@ STR_CHAPTER_PREFIX: "Bölüm: "
|
|||||||
STR_PAGES_SEPARATOR: " sayfa | "
|
STR_PAGES_SEPARATOR: " sayfa | "
|
||||||
STR_BOOK_PREFIX: "Kitap: "
|
STR_BOOK_PREFIX: "Kitap: "
|
||||||
STR_CALIBRE_URL_HINT: "Calibre için URL'nize /opds ekleyin"
|
STR_CALIBRE_URL_HINT: "Calibre için URL'nize /opds ekleyin"
|
||||||
STR_PERCENT_STEP_HINT: "Sol/Sağ: %1 Yukarı/Aşağı: %10"
|
|
||||||
STR_SYNCING_TIME: "Zaman senkronize ediliyor..."
|
STR_SYNCING_TIME: "Zaman senkronize ediliyor..."
|
||||||
STR_CALC_HASH: "Belge özeti hesaplanıyor..."
|
STR_CALC_HASH: "Belge özeti hesaplanıyor..."
|
||||||
STR_HASH_FAILED: "Belge özeti hesaplanamadı"
|
STR_HASH_FAILED: "Belge özeti hesaplanamadı"
|
||||||
@@ -286,7 +290,8 @@ STR_IMAGES_SUPPRESS: "Bastır"
|
|||||||
STR_LINK: "[bağlantı]"
|
STR_LINK: "[bağlantı]"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u dak"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u dak"
|
||||||
STR_SLEEP_NEVER: "Asla"
|
STR_SLEEP_NEVER: "Asla"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Sol/Sağ: 1 dak Yukarı/Aşağı: 5 dak"
|
STR_STEP_HINT_FRONT: "Ön tuşlar:"
|
||||||
|
STR_STEP_HINT_SIDE: "Yan tuşlar:"
|
||||||
STR_NO_FILES_FOUND: "Dosya bulunamadı"
|
STR_NO_FILES_FOUND: "Dosya bulunamadı"
|
||||||
STR_NO_FOOTNOTES: "Bu sayfada dipnot yok"
|
STR_NO_FOOTNOTES: "Bu sayfada dipnot yok"
|
||||||
STR_PREVIEW: "Önizleme"
|
STR_PREVIEW: "Önizleme"
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ STR_SLEEP_COVER_MODE: "Режим заповнення"
|
|||||||
STR_HIDE_BATTERY: "Приховати % батареї"
|
STR_HIDE_BATTERY: "Приховати % батареї"
|
||||||
STR_EXTRA_SPACING: "Додатковий інтервал між абзацами"
|
STR_EXTRA_SPACING: "Додатковий інтервал між абзацами"
|
||||||
STR_TEXT_AA: "Згладжування тексту"
|
STR_TEXT_AA: "Згладжування тексту"
|
||||||
|
STR_TEXT_AA_FULL: "Повне"
|
||||||
|
STR_TEXT_AA_FAST: "Швидке"
|
||||||
STR_IMAGES: "Зображення"
|
STR_IMAGES: "Зображення"
|
||||||
STR_IMAGES_DISPLAY: "Показати"
|
STR_IMAGES_DISPLAY: "Показати"
|
||||||
STR_IMAGES_PLACEHOLDER: "Заглушка"
|
STR_IMAGES_PLACEHOLDER: "Заглушка"
|
||||||
@@ -73,7 +75,6 @@ STR_IMAGES_SUPPRESS: "Приховати"
|
|||||||
STR_SHORT_PWR_BTN: "Короткий натиск кн. живл."
|
STR_SHORT_PWR_BTN: "Короткий натиск кн. живл."
|
||||||
STR_ORIENTATION: "Орієнтація читання"
|
STR_ORIENTATION: "Орієнтація читання"
|
||||||
STR_SIDE_BTN_LAYOUT: "Схема бічних кнопок"
|
STR_SIDE_BTN_LAYOUT: "Схема бічних кнопок"
|
||||||
STR_TOUCH_READER_CONTROLS: "Сенсорне керування читанням"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Орієнтувати передні кнопки"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Орієнтувати передні кнопки"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Поведінка при довгому настику"
|
STR_LONG_PRESS_BEHAVIOR: "Поведінка при довгому настику"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Немає"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Немає"
|
||||||
@@ -138,7 +139,8 @@ STR_PAGE_TURN: "Наст. сторінка"
|
|||||||
STR_FORCE_REFRESH: "Оновити екран"
|
STR_FORCE_REFRESH: "Оновити екран"
|
||||||
STR_PORTRAIT: "Книжкова"
|
STR_PORTRAIT: "Книжкова"
|
||||||
STR_LANDSCAPE_CW: "Альбом. за год."
|
STR_LANDSCAPE_CW: "Альбом. за год."
|
||||||
STR_INVERTED: "Перевернутий"
|
STR_INVERTED: "Інверсія"
|
||||||
|
STR_ORIENTATION_INVERTED: "Книжкова 180°"
|
||||||
STR_LANDSCAPE_CCW: "Альбом. проти год."
|
STR_LANDSCAPE_CCW: "Альбом. проти год."
|
||||||
STR_PREV_NEXT: "Попер/Наст"
|
STR_PREV_NEXT: "Попер/Наст"
|
||||||
STR_NEXT_PREV: "Наст/Попер"
|
STR_NEXT_PREV: "Наст/Попер"
|
||||||
@@ -177,8 +179,7 @@ STR_DOWNLOADING: "Завантаження..."
|
|||||||
STR_DOWNLOAD_FAILED: "Завантаження не вдалося"
|
STR_DOWNLOAD_FAILED: "Завантаження не вдалося"
|
||||||
STR_ERROR_MSG: "Помилка:"
|
STR_ERROR_MSG: "Помилка:"
|
||||||
STR_UNNAMED: "Без назви"
|
STR_UNNAMED: "Без назви"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Утрим. Підтвердити, щоб Видалити"
|
STR_HOLD_OPEN_TO_DELETE: "Утримуйте Відкрити, щоб видалити"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Утрим. Підтвердити в книзі, щоб створ. закладку"
|
|
||||||
STR_NO_SERVER_URL: "URL сервера не налаштовано"
|
STR_NO_SERVER_URL: "URL сервера не налаштовано"
|
||||||
STR_FETCH_FEED_FAILED: "Не вдалося отримати стрічку"
|
STR_FETCH_FEED_FAILED: "Не вдалося отримати стрічку"
|
||||||
STR_PARSE_FEED_FAILED: "Не вдалося розпарсити стрічку"
|
STR_PARSE_FEED_FAILED: "Не вдалося розпарсити стрічку"
|
||||||
@@ -196,6 +197,7 @@ STR_HOME: "« Додому"
|
|||||||
STR_SELECT: "Вибрати"
|
STR_SELECT: "Вибрати"
|
||||||
STR_SELECTED: "Вибрано"
|
STR_SELECTED: "Вибрано"
|
||||||
STR_TOGGLE: "Обрати"
|
STR_TOGGLE: "Обрати"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Перемкнути закладку"
|
||||||
STR_CONFIRM: "Підтвердити"
|
STR_CONFIRM: "Підтвердити"
|
||||||
STR_CANCEL: "Скасувати"
|
STR_CANCEL: "Скасувати"
|
||||||
STR_CONNECT: "Приєдн."
|
STR_CONNECT: "Приєдн."
|
||||||
@@ -258,6 +260,7 @@ STR_SUNLIGHT_FADING_FIX: "Виправлення вицвітання на со
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Налаштувати передні кнопки"
|
STR_REMAP_FRONT_BUTTONS: "Налаштувати передні кнопки"
|
||||||
STR_BOOKMARKS: "Закладки"
|
STR_BOOKMARKS: "Закладки"
|
||||||
STR_BOOKMARK_ADDED: "Закладку додано"
|
STR_BOOKMARK_ADDED: "Закладку додано"
|
||||||
|
STR_BOOKMARK_REMOVED: "Закладку видалено"
|
||||||
STR_OPDS_BROWSER: "Браузер OPDS"
|
STR_OPDS_BROWSER: "Браузер OPDS"
|
||||||
STR_SEARCH: "Пошук"
|
STR_SEARCH: "Пошук"
|
||||||
STR_COVER_CUSTOM: "Обкл. + власне"
|
STR_COVER_CUSTOM: "Обкл. + власне"
|
||||||
@@ -293,7 +296,6 @@ STR_CHAPTER_PREFIX: "Розділ: "
|
|||||||
STR_PAGES_SEPARATOR: " сторінок | "
|
STR_PAGES_SEPARATOR: " сторінок | "
|
||||||
STR_BOOK_PREFIX: "Книга: "
|
STR_BOOK_PREFIX: "Книга: "
|
||||||
STR_CALIBRE_URL_HINT: "Для Calibre додайте /opds до вашої URL"
|
STR_CALIBRE_URL_HINT: "Для Calibre додайте /opds до вашої URL"
|
||||||
STR_PERCENT_STEP_HINT: "Вліво/Вправо: 1% Вгору/Вниз: 10%"
|
|
||||||
STR_SYNCING_TIME: "Синхронізація часу..."
|
STR_SYNCING_TIME: "Синхронізація часу..."
|
||||||
STR_CALC_HASH: "Обчислення хешу документа..."
|
STR_CALC_HASH: "Обчислення хешу документа..."
|
||||||
STR_HASH_FAILED: "Не вдалося обчислити хеш документа"
|
STR_HASH_FAILED: "Не вдалося обчислити хеш документа"
|
||||||
@@ -328,7 +330,8 @@ STR_LINK: "[посилання]"
|
|||||||
STR_SCREENSHOT_BUTTON: "Знімок екрана"
|
STR_SCREENSHOT_BUTTON: "Знімок екрана"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u хв"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u хв"
|
||||||
STR_SLEEP_NEVER: "Ніколи"
|
STR_SLEEP_NEVER: "Ніколи"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Вліво/Вправо: 1 хв Вгору/Вниз: 5 хв"
|
STR_STEP_HINT_FRONT: "Передні кнопки:"
|
||||||
|
STR_STEP_HINT_SIDE: "Бічні кнопки:"
|
||||||
STR_ADD_SERVER: "Додати сервер"
|
STR_ADD_SERVER: "Додати сервер"
|
||||||
STR_SERVER_NAME: "Назва сервера"
|
STR_SERVER_NAME: "Назва сервера"
|
||||||
STR_NO_SERVERS: "Не налаштовано жодного сервера OPDS"
|
STR_NO_SERVERS: "Не налаштовано жодного сервера OPDS"
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ STR_SLEEP_COVER_MODE: "Mode de pantalla de repòs"
|
|||||||
STR_HIDE_BATTERY: "Oculta el % de bateria"
|
STR_HIDE_BATTERY: "Oculta el % de bateria"
|
||||||
STR_EXTRA_SPACING: "Espaiat de paràgraf extra"
|
STR_EXTRA_SPACING: "Espaiat de paràgraf extra"
|
||||||
STR_TEXT_AA: "Antialiàsing del text"
|
STR_TEXT_AA: "Antialiàsing del text"
|
||||||
|
STR_TEXT_AA_FULL: "Complet"
|
||||||
|
STR_TEXT_AA_FAST: "Ràpid"
|
||||||
STR_IMAGES: "Imatges"
|
STR_IMAGES: "Imatges"
|
||||||
STR_IMAGES_DISPLAY: "Mostrar"
|
STR_IMAGES_DISPLAY: "Mostrar"
|
||||||
STR_IMAGES_PLACEHOLDER: "Text de mostra"
|
STR_IMAGES_PLACEHOLDER: "Text de mostra"
|
||||||
@@ -73,7 +75,6 @@ STR_IMAGES_SUPPRESS: "Eliminar"
|
|||||||
STR_SHORT_PWR_BTN: "Clic curt del botó d'engegada"
|
STR_SHORT_PWR_BTN: "Clic curt del botó d'engegada"
|
||||||
STR_ORIENTATION: "Orientació de lectura"
|
STR_ORIENTATION: "Orientació de lectura"
|
||||||
STR_SIDE_BTN_LAYOUT: "Disposició botons laterals"
|
STR_SIDE_BTN_LAYOUT: "Disposició botons laterals"
|
||||||
STR_TOUCH_READER_CONTROLS: "Controls tàctils del lector"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientar botons frontals"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Orientar botons frontals"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Comportament de prémer llargament el botó"
|
STR_LONG_PRESS_BEHAVIOR: "Comportament de prémer llargament el botó"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "Desactivat"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "Desactivat"
|
||||||
@@ -90,7 +91,8 @@ STR_HYPHENATION: "Partició de mots"
|
|||||||
STR_TIME_TO_SLEEP: "Temps per entrar en repòs"
|
STR_TIME_TO_SLEEP: "Temps per entrar en repòs"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u min"
|
||||||
STR_SLEEP_NEVER: "Mai"
|
STR_SLEEP_NEVER: "Mai"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Esquerra/Dreta: 1 min Amunt/Avall: 5 min"
|
STR_STEP_HINT_FRONT: "Botons frontals:"
|
||||||
|
STR_STEP_HINT_SIDE: "Botons laterals:"
|
||||||
STR_SHOW_HIDDEN_FILES: "Mostra arxius ocults"
|
STR_SHOW_HIDDEN_FILES: "Mostra arxius ocults"
|
||||||
STR_REMOVE_READ_FROM_RECENTS: "Esborra els llibres llegits de la llista de recents"
|
STR_REMOVE_READ_FROM_RECENTS: "Esborra els llibres llegits de la llista de recents"
|
||||||
STR_MOVE_FINISHED_TO_READ: "Mou els llibres acabats a la carpeta Read"
|
STR_MOVE_FINISHED_TO_READ: "Mou els llibres acabats a la carpeta Read"
|
||||||
@@ -142,6 +144,7 @@ STR_PAGE_TURN: "Canvi de pàgina"
|
|||||||
STR_PORTRAIT: "Vertical"
|
STR_PORTRAIT: "Vertical"
|
||||||
STR_LANDSCAPE_CW: "Horitzontal horari"
|
STR_LANDSCAPE_CW: "Horitzontal horari"
|
||||||
STR_INVERTED: "Invertit"
|
STR_INVERTED: "Invertit"
|
||||||
|
STR_ORIENTATION_INVERTED: "Vertical 180°"
|
||||||
STR_LANDSCAPE_CCW: "Horitzontal antihorari"
|
STR_LANDSCAPE_CCW: "Horitzontal antihorari"
|
||||||
STR_PREV_NEXT: "Anterior/Següent"
|
STR_PREV_NEXT: "Anterior/Següent"
|
||||||
STR_NEXT_PREV: "Següent/Anterior"
|
STR_NEXT_PREV: "Següent/Anterior"
|
||||||
@@ -181,8 +184,7 @@ STR_DOWNLOADING: "S'està baixant..."
|
|||||||
STR_DOWNLOAD_FAILED: "Ha fallat la baixada"
|
STR_DOWNLOAD_FAILED: "Ha fallat la baixada"
|
||||||
STR_ERROR_MSG: "Error:"
|
STR_ERROR_MSG: "Error:"
|
||||||
STR_UNNAMED: "Sense nom"
|
STR_UNNAMED: "Sense nom"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Manteniu premut Confirma per esborrar"
|
STR_HOLD_OPEN_TO_DELETE: "Manteniu premut Obre per esborrar"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Manteniu premut Confirma al lector per crear un punt de llibre."
|
|
||||||
STR_NO_SERVER_URL: "No s'ha configurat cap URL de servidor"
|
STR_NO_SERVER_URL: "No s'ha configurat cap URL de servidor"
|
||||||
STR_FETCH_FEED_FAILED: "Ha fallat l'obtenció del feed"
|
STR_FETCH_FEED_FAILED: "Ha fallat l'obtenció del feed"
|
||||||
STR_PARSE_FEED_FAILED: "Ha fallat l'anàlisi del feed"
|
STR_PARSE_FEED_FAILED: "Ha fallat l'anàlisi del feed"
|
||||||
@@ -198,6 +200,7 @@ STR_HOME: "« Inici"
|
|||||||
STR_SELECT: "Selecciona"
|
STR_SELECT: "Selecciona"
|
||||||
STR_SELECTED: "Seleccionat"
|
STR_SELECTED: "Seleccionat"
|
||||||
STR_TOGGLE: "Canvia"
|
STR_TOGGLE: "Canvia"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Canvia punt de llibre"
|
||||||
STR_CONFIRM: "Confirma"
|
STR_CONFIRM: "Confirma"
|
||||||
STR_CANCEL: "Cancel·la"
|
STR_CANCEL: "Cancel·la"
|
||||||
STR_CONNECT: "Connecta"
|
STR_CONNECT: "Connecta"
|
||||||
@@ -241,6 +244,7 @@ STR_SUNLIGHT_FADING_FIX: "Correcció de l'esvaïment pel sol"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Reassigna els botons frontals"
|
STR_REMAP_FRONT_BUTTONS: "Reassigna els botons frontals"
|
||||||
STR_BOOKMARKS: "Punts de llibre"
|
STR_BOOKMARKS: "Punts de llibre"
|
||||||
STR_BOOKMARK_ADDED: "S'ha afegit el punt de llibre."
|
STR_BOOKMARK_ADDED: "S'ha afegit el punt de llibre."
|
||||||
|
STR_BOOKMARK_REMOVED: "S'ha eliminat el punt de llibre."
|
||||||
STR_OPDS_BROWSER: "Navegador OPDS"
|
STR_OPDS_BROWSER: "Navegador OPDS"
|
||||||
STR_COVER_CUSTOM: "Portada + Personalitzat"
|
STR_COVER_CUSTOM: "Portada + Personalitzat"
|
||||||
STR_QUICK_RESUME: "Represa ràpida"
|
STR_QUICK_RESUME: "Represa ràpida"
|
||||||
@@ -275,7 +279,6 @@ STR_CHAPTER_PREFIX: "Capítol: "
|
|||||||
STR_PAGES_SEPARATOR: " pàgines | "
|
STR_PAGES_SEPARATOR: " pàgines | "
|
||||||
STR_BOOK_PREFIX: "Llibre: "
|
STR_BOOK_PREFIX: "Llibre: "
|
||||||
STR_CALIBRE_URL_HINT: "Per al Calibre, afegiu /opds a la URL"
|
STR_CALIBRE_URL_HINT: "Per al Calibre, afegiu /opds a la URL"
|
||||||
STR_PERCENT_STEP_HINT: "Esquerra/Dreta: 1% Amunt/Avall: 10%"
|
|
||||||
STR_SYNCING_TIME: "S'està sincronitzant el temps..."
|
STR_SYNCING_TIME: "S'està sincronitzant el temps..."
|
||||||
STR_CALC_HASH: "S'està calculant el hash del document..."
|
STR_CALC_HASH: "S'està calculant el hash del document..."
|
||||||
STR_HASH_FAILED: "No s'ha pogut calcular el hash del document"
|
STR_HASH_FAILED: "No s'ha pogut calcular el hash del document"
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ STR_SLEEP_COVER_MODE: "Kiểu ảnh bìa màn hình ngủ"
|
|||||||
STR_HIDE_BATTERY: "Ẩn % pin"
|
STR_HIDE_BATTERY: "Ẩn % pin"
|
||||||
STR_EXTRA_SPACING: "Giãn cách đoạn thêm"
|
STR_EXTRA_SPACING: "Giãn cách đoạn thêm"
|
||||||
STR_TEXT_AA: "Khử răng cưa chữ"
|
STR_TEXT_AA: "Khử răng cưa chữ"
|
||||||
|
STR_TEXT_AA_FULL: "Đầy đủ"
|
||||||
|
STR_TEXT_AA_FAST: "Nhanh"
|
||||||
STR_IMAGES: "Hình ảnh"
|
STR_IMAGES: "Hình ảnh"
|
||||||
STR_IMAGES_DISPLAY: "Hiển thị"
|
STR_IMAGES_DISPLAY: "Hiển thị"
|
||||||
STR_IMAGES_PLACEHOLDER: "Khung thay thế"
|
STR_IMAGES_PLACEHOLDER: "Khung thay thế"
|
||||||
@@ -73,7 +75,6 @@ STR_IMAGES_SUPPRESS: "Ẩn đi"
|
|||||||
STR_SHORT_PWR_BTN: "Nhấn nhanh nút nguồn"
|
STR_SHORT_PWR_BTN: "Nhấn nhanh nút nguồn"
|
||||||
STR_ORIENTATION: "Hướng đọc"
|
STR_ORIENTATION: "Hướng đọc"
|
||||||
STR_SIDE_BTN_LAYOUT: "Bố trí nút bên (trình đọc)"
|
STR_SIDE_BTN_LAYOUT: "Bố trí nút bên (trình đọc)"
|
||||||
STR_TOUCH_READER_CONTROLS: "Điều khiển cảm ứng (trình đọc)"
|
|
||||||
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Xoay nút trước theo hướng"
|
STR_FRONT_BTN_FOLLOW_ORIENTATION: "Xoay nút trước theo hướng"
|
||||||
STR_LONG_PRESS_BEHAVIOR: "Hành vi nhấn giữ nút"
|
STR_LONG_PRESS_BEHAVIOR: "Hành vi nhấn giữ nút"
|
||||||
STR_LONG_PRESS_BEHAVIOR_OFF: "TẮT"
|
STR_LONG_PRESS_BEHAVIOR_OFF: "TẮT"
|
||||||
@@ -138,7 +139,8 @@ STR_PAGE_TURN: "Lật trang"
|
|||||||
STR_FORCE_REFRESH: "Làm tươi màn hình"
|
STR_FORCE_REFRESH: "Làm tươi màn hình"
|
||||||
STR_PORTRAIT: "Dọc"
|
STR_PORTRAIT: "Dọc"
|
||||||
STR_LANDSCAPE_CW: "Ngang (thuận)"
|
STR_LANDSCAPE_CW: "Ngang (thuận)"
|
||||||
STR_INVERTED: "Lật ngược"
|
STR_INVERTED: "Đảo màu"
|
||||||
|
STR_ORIENTATION_INVERTED: "Dọc 180°"
|
||||||
STR_LANDSCAPE_CCW: "Ngang (ngược)"
|
STR_LANDSCAPE_CCW: "Ngang (ngược)"
|
||||||
STR_PREV_NEXT: "Trước/Sau"
|
STR_PREV_NEXT: "Trước/Sau"
|
||||||
STR_NEXT_PREV: "Sau/Trước"
|
STR_NEXT_PREV: "Sau/Trước"
|
||||||
@@ -177,8 +179,7 @@ STR_DOWNLOADING: "Đang tải về..."
|
|||||||
STR_DOWNLOAD_FAILED: "Tải về thất bại"
|
STR_DOWNLOAD_FAILED: "Tải về thất bại"
|
||||||
STR_ERROR_MSG: "Lỗi:"
|
STR_ERROR_MSG: "Lỗi:"
|
||||||
STR_UNNAMED: "Không tên"
|
STR_UNNAMED: "Không tên"
|
||||||
STR_HOLD_CONFIRM_TO_DELETE: "Giữ Xác nhận để xóa"
|
STR_HOLD_OPEN_TO_DELETE: "Giữ Mở để xóa"
|
||||||
STR_BOOKMARK_INSTRUCTIONS: "Giữ Xác nhận trong trình đọc để tạo dấu trang."
|
|
||||||
STR_NO_SERVER_URL: "Chưa cấu hình URL máy chủ"
|
STR_NO_SERVER_URL: "Chưa cấu hình URL máy chủ"
|
||||||
STR_FETCH_FEED_FAILED: "Không tải được nguồn cấp"
|
STR_FETCH_FEED_FAILED: "Không tải được nguồn cấp"
|
||||||
STR_PARSE_FEED_FAILED: "Không phân tích được nguồn cấp"
|
STR_PARSE_FEED_FAILED: "Không phân tích được nguồn cấp"
|
||||||
@@ -196,6 +197,7 @@ STR_HOME: "« Thư viện"
|
|||||||
STR_SELECT: "Chọn"
|
STR_SELECT: "Chọn"
|
||||||
STR_SELECTED: "Đã chọn"
|
STR_SELECTED: "Đã chọn"
|
||||||
STR_TOGGLE: "Bật/Tắt"
|
STR_TOGGLE: "Bật/Tắt"
|
||||||
|
STR_TOGGLE_BOOKMARK: "Bật/tắt dấu trang"
|
||||||
STR_CONFIRM: "Xác nhận"
|
STR_CONFIRM: "Xác nhận"
|
||||||
STR_CANCEL: "Hủy"
|
STR_CANCEL: "Hủy"
|
||||||
STR_CONNECT: "Kết nối"
|
STR_CONNECT: "Kết nối"
|
||||||
@@ -258,6 +260,7 @@ STR_SUNLIGHT_FADING_FIX: "Khắc phục mờ dưới nắng"
|
|||||||
STR_REMAP_FRONT_BUTTONS: "Gán lại nút mặt trước"
|
STR_REMAP_FRONT_BUTTONS: "Gán lại nút mặt trước"
|
||||||
STR_BOOKMARKS: "Dấu trang"
|
STR_BOOKMARKS: "Dấu trang"
|
||||||
STR_BOOKMARK_ADDED: "Đã thêm dấu trang."
|
STR_BOOKMARK_ADDED: "Đã thêm dấu trang."
|
||||||
|
STR_BOOKMARK_REMOVED: "Đã xóa dấu trang."
|
||||||
STR_OPDS_BROWSER: "Trình duyệt OPDS"
|
STR_OPDS_BROWSER: "Trình duyệt OPDS"
|
||||||
STR_SEARCH: "Tìm kiếm"
|
STR_SEARCH: "Tìm kiếm"
|
||||||
STR_COVER_CUSTOM: "Ảnh bìa + Tùy chỉnh"
|
STR_COVER_CUSTOM: "Ảnh bìa + Tùy chỉnh"
|
||||||
@@ -293,7 +296,6 @@ STR_CHAPTER_PREFIX: "Chương: "
|
|||||||
STR_PAGES_SEPARATOR: " trang | "
|
STR_PAGES_SEPARATOR: " trang | "
|
||||||
STR_BOOK_PREFIX: "Sách: "
|
STR_BOOK_PREFIX: "Sách: "
|
||||||
STR_CALIBRE_URL_HINT: "Với Calibre, thêm /opds vào URL"
|
STR_CALIBRE_URL_HINT: "Với Calibre, thêm /opds vào URL"
|
||||||
STR_PERCENT_STEP_HINT: "Trái/Phải: 1% Lên/Xuống: 10%"
|
|
||||||
STR_SYNCING_TIME: "Đang đồng bộ giờ..."
|
STR_SYNCING_TIME: "Đang đồng bộ giờ..."
|
||||||
STR_CALC_HASH: "Đang tính mã băm tài liệu..."
|
STR_CALC_HASH: "Đang tính mã băm tài liệu..."
|
||||||
STR_HASH_FAILED: "Không tính được mã băm tài liệu"
|
STR_HASH_FAILED: "Không tính được mã băm tài liệu"
|
||||||
@@ -327,7 +329,8 @@ STR_LINK: "[liên kết]"
|
|||||||
STR_SCREENSHOT_BUTTON: "Chụp màn hình"
|
STR_SCREENSHOT_BUTTON: "Chụp màn hình"
|
||||||
STR_SLEEP_TIMER_VALUE_FORMAT: "%u phút"
|
STR_SLEEP_TIMER_VALUE_FORMAT: "%u phút"
|
||||||
STR_SLEEP_NEVER: "Không bao giờ"
|
STR_SLEEP_NEVER: "Không bao giờ"
|
||||||
STR_SLEEP_TIMER_STEP_HINT: "Trái/Phải: 1 phút Lên/Xuống: 5 phút"
|
STR_STEP_HINT_FRONT: "Nút trước:"
|
||||||
|
STR_STEP_HINT_SIDE: "Nút bên:"
|
||||||
STR_ADD_SERVER: "Thêm máy chủ"
|
STR_ADD_SERVER: "Thêm máy chủ"
|
||||||
STR_SERVER_NAME: "Tên máy chủ"
|
STR_SERVER_NAME: "Tên máy chủ"
|
||||||
STR_NO_SERVERS: "Chưa cấu hình máy chủ OPDS"
|
STR_NO_SERVERS: "Chưa cấu hình máy chủ OPDS"
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ namespace {
|
|||||||
constexpr int MAX_MCU_HEIGHT = 16;
|
constexpr int MAX_MCU_HEIGHT = 16;
|
||||||
constexpr size_t JPEG_DECODER_SIZE = 20 * 1024;
|
constexpr size_t JPEG_DECODER_SIZE = 20 * 1024;
|
||||||
constexpr size_t MIN_FREE_HEAP = JPEG_DECODER_SIZE + 32 * 1024;
|
constexpr size_t MIN_FREE_HEAP = JPEG_DECODER_SIZE + 32 * 1024;
|
||||||
|
constexpr uint32_t FP_ONE = 1UL << 16;
|
||||||
|
|
||||||
// Static file pointer for JPEGDEC open callback.
|
// Static file pointer for JPEGDEC open callback.
|
||||||
// Safe in single-threaded embedded context; never accessed concurrently.
|
// Safe in single-threaded embedded context; never accessed concurrently.
|
||||||
@@ -208,6 +209,9 @@ struct BmpConvertCtx {
|
|||||||
bool needsScaling;
|
bool needsScaling;
|
||||||
uint32_t scaleX_fp; // source pixels per output pixel, 16.16 fixed-point
|
uint32_t scaleX_fp; // source pixels per output pixel, 16.16 fixed-point
|
||||||
uint32_t scaleY_fp;
|
uint32_t scaleY_fp;
|
||||||
|
bool smoothUpscale;
|
||||||
|
uint32_t smoothScaleX_fp;
|
||||||
|
uint32_t smoothScaleY_fp;
|
||||||
|
|
||||||
// Accumulates one MCU row (up to MAX_MCU_HEIGHT source rows × srcWidth pixels)
|
// Accumulates one MCU row (up to MAX_MCU_HEIGHT source rows × srcWidth pixels)
|
||||||
// Filled column-by-column as JPEGDEC callbacks arrive for the same MCU row
|
// Filled column-by-column as JPEGDEC callbacks arrive for the same MCU row
|
||||||
@@ -219,6 +223,13 @@ struct BmpConvertCtx {
|
|||||||
std::unique_ptr<uint32_t[]> rowAccum;
|
std::unique_ptr<uint32_t[]> rowAccum;
|
||||||
std::unique_ptr<uint32_t[]> rowCount;
|
std::unique_ptr<uint32_t[]> rowCount;
|
||||||
|
|
||||||
|
int smoothNextOutY;
|
||||||
|
int smoothPrevY;
|
||||||
|
std::unique_ptr<uint8_t[]> smoothRows;
|
||||||
|
uint8_t* smoothPrevRow;
|
||||||
|
uint8_t* smoothCurrRow;
|
||||||
|
uint8_t* smoothOutRow;
|
||||||
|
|
||||||
std::unique_ptr<uint8_t[]> bmpRow;
|
std::unique_ptr<uint8_t[]> bmpRow;
|
||||||
|
|
||||||
std::unique_ptr<AtkinsonDitherer> atkinsonDitherer;
|
std::unique_ptr<AtkinsonDitherer> atkinsonDitherer;
|
||||||
@@ -265,6 +276,88 @@ static void writeOutputRow(BmpConvertCtx* ctx, const uint8_t* srcRow, int outY)
|
|||||||
ctx->bmpOut->write(ctx->bmpRow.get(), ctx->bytesPerRow);
|
ctx->bmpOut->write(ctx->bmpRow.get(), ctx->bytesPerRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Matches the progressive-JPEG smoothing used by JpegToFramebufferConverter, but stays
|
||||||
|
// local because cover generation streams dithered BMP rows instead of framebuffer pixels.
|
||||||
|
static uint32_t interpolationStep(const int srcSize, const int outSize) {
|
||||||
|
if (srcSize <= 1 || outSize <= 1) return 0;
|
||||||
|
return (static_cast<uint32_t>(srcSize - 1) << 16) / static_cast<uint32_t>(outSize - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint32_t interpolatedSourceFp(const int outIndex, const int outSize, const int srcSize, const uint32_t step) {
|
||||||
|
if (srcSize <= 1 || outSize <= 1) return 0;
|
||||||
|
if (outIndex >= outSize - 1) return static_cast<uint32_t>(srcSize - 1) << 16;
|
||||||
|
return static_cast<uint32_t>(outIndex) * step;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void scaleRowLinear(BmpConvertCtx* ctx, const uint8_t* srcRow, uint8_t* dstRow) {
|
||||||
|
for (int outX = 0; outX < ctx->outWidth; outX++) {
|
||||||
|
const uint32_t srcX_fp = interpolatedSourceFp(outX, ctx->outWidth, ctx->srcWidth, ctx->smoothScaleX_fp);
|
||||||
|
const int x0 = srcX_fp >> 16;
|
||||||
|
const int x1 = (x0 + 1 < ctx->srcWidth) ? (x0 + 1) : x0;
|
||||||
|
const uint32_t fx = srcX_fp & (FP_ONE - 1);
|
||||||
|
dstRow[outX] = static_cast<uint8_t>((srcRow[x0] * (FP_ONE - fx) + srcRow[x1] * fx) >> 16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void writeBlendedRow(BmpConvertCtx* ctx, const uint8_t* row0, const uint8_t* row1, const uint32_t fy,
|
||||||
|
const int outY) {
|
||||||
|
const uint32_t invFy = FP_ONE - fy;
|
||||||
|
for (int outX = 0; outX < ctx->outWidth; outX++) {
|
||||||
|
ctx->smoothOutRow[outX] = static_cast<uint8_t>((row0[outX] * invFy + row1[outX] * fy) >> 16);
|
||||||
|
}
|
||||||
|
writeOutputRow(ctx, ctx->smoothOutRow, outY);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void processSmoothSourceRow(BmpConvertCtx* ctx, const uint8_t* srcRow, const int srcY) {
|
||||||
|
scaleRowLinear(ctx, srcRow, ctx->smoothCurrRow);
|
||||||
|
|
||||||
|
if (ctx->smoothPrevY < 0) {
|
||||||
|
uint8_t* tmp = ctx->smoothPrevRow;
|
||||||
|
ctx->smoothPrevRow = ctx->smoothCurrRow;
|
||||||
|
ctx->smoothCurrRow = tmp;
|
||||||
|
ctx->smoothPrevY = srcY;
|
||||||
|
if (ctx->srcHeight <= 1) {
|
||||||
|
while (ctx->smoothNextOutY < ctx->outHeight) {
|
||||||
|
writeOutputRow(ctx, ctx->smoothPrevRow, ctx->smoothNextOutY);
|
||||||
|
ctx->smoothNextOutY++;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (ctx->smoothNextOutY < ctx->outHeight) {
|
||||||
|
const uint32_t srcY_fp =
|
||||||
|
interpolatedSourceFp(ctx->smoothNextOutY, ctx->outHeight, ctx->srcHeight, ctx->smoothScaleY_fp);
|
||||||
|
const int y0 = srcY_fp >> 16;
|
||||||
|
const int y1 = (y0 + 1 < ctx->srcHeight) ? (y0 + 1) : y0;
|
||||||
|
if (y1 > srcY) break;
|
||||||
|
|
||||||
|
const uint8_t* row0 = (y0 == srcY) ? ctx->smoothCurrRow : ctx->smoothPrevRow;
|
||||||
|
const uint8_t* row1 = (y1 == srcY) ? ctx->smoothCurrRow : ctx->smoothPrevRow;
|
||||||
|
writeBlendedRow(ctx, row0, row1, srcY_fp & (FP_ONE - 1), ctx->smoothNextOutY);
|
||||||
|
ctx->smoothNextOutY++;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t* tmp = ctx->smoothPrevRow;
|
||||||
|
ctx->smoothPrevRow = ctx->smoothCurrRow;
|
||||||
|
ctx->smoothCurrRow = tmp;
|
||||||
|
ctx->smoothPrevY = srcY;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void finishSmoothUpscale(BmpConvertCtx* ctx) {
|
||||||
|
if (ctx->smoothPrevY < 0) {
|
||||||
|
LOG_ERR("JPG", "No progressive rows decoded for smoothing");
|
||||||
|
ctx->error = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (ctx->smoothNextOutY < ctx->outHeight) {
|
||||||
|
writeOutputRow(ctx, ctx->smoothPrevRow, ctx->smoothNextOutY);
|
||||||
|
ctx->smoothNextOutY++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Flush one scaled output row from Y-axis accumulators and advance currentOutY
|
// Flush one scaled output row from Y-axis accumulators and advance currentOutY
|
||||||
static void flushScaledRow(BmpConvertCtx* ctx) {
|
static void flushScaledRow(BmpConvertCtx* ctx) {
|
||||||
memset(ctx->bmpRow.get(), 0, ctx->bytesPerRow);
|
memset(ctx->bmpRow.get(), 0, ctx->bytesPerRow);
|
||||||
@@ -344,7 +437,9 @@ int bmpDrawCallback(JPEGDRAW* pDraw) {
|
|||||||
for (int y = blockY; y < endRow && y < ctx->srcHeight; y++) {
|
for (int y = blockY; y < endRow && y < ctx->srcHeight; y++) {
|
||||||
const uint8_t* srcRow = ctx->mcuBuf.get() + (y - blockY) * ctx->srcWidth;
|
const uint8_t* srcRow = ctx->mcuBuf.get() + (y - blockY) * ctx->srcWidth;
|
||||||
|
|
||||||
if (!ctx->needsScaling) {
|
if (ctx->smoothUpscale) {
|
||||||
|
processSmoothSourceRow(ctx, srcRow, y);
|
||||||
|
} else if (!ctx->needsScaling) {
|
||||||
// 1:1 — outWidth == srcWidth, write directly
|
// 1:1 — outWidth == srcWidth, write directly
|
||||||
writeOutputRow(ctx, srcRow, y);
|
writeOutputRow(ctx, srcRow, y);
|
||||||
} else {
|
} else {
|
||||||
@@ -472,6 +567,9 @@ bool JpegToBmpConverter::jpegFileToBmpStreamInternal(HalFile& jpegFile, Print& b
|
|||||||
needsScaling = true;
|
needsScaling = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool smoothUpscale =
|
||||||
|
progressiveDecode && needsScaling && scaleSrcWidth <= outWidth && scaleSrcHeight <= outHeight;
|
||||||
|
|
||||||
// Write BMP header with output dimensions
|
// Write BMP header with output dimensions
|
||||||
int bytesPerRow;
|
int bytesPerRow;
|
||||||
if (USE_8BIT_OUTPUT && !oneBit) {
|
if (USE_8BIT_OUTPUT && !oneBit) {
|
||||||
@@ -496,6 +594,11 @@ bool JpegToBmpConverter::jpegFileToBmpStreamInternal(HalFile& jpegFile, Print& b
|
|||||||
ctx.needsScaling = needsScaling;
|
ctx.needsScaling = needsScaling;
|
||||||
ctx.scaleX_fp = scaleX_fp;
|
ctx.scaleX_fp = scaleX_fp;
|
||||||
ctx.scaleY_fp = scaleY_fp;
|
ctx.scaleY_fp = scaleY_fp;
|
||||||
|
ctx.smoothUpscale = smoothUpscale;
|
||||||
|
ctx.smoothScaleX_fp = interpolationStep(ctx.srcWidth, outWidth);
|
||||||
|
ctx.smoothScaleY_fp = interpolationStep(ctx.srcHeight, outHeight);
|
||||||
|
ctx.smoothNextOutY = 0;
|
||||||
|
ctx.smoothPrevY = -1;
|
||||||
ctx.error = false;
|
ctx.error = false;
|
||||||
|
|
||||||
// MCU row buffer: MAX_MCU_HEIGHT rows × decoded srcWidth columns of grayscale
|
// MCU row buffer: MAX_MCU_HEIGHT rows × decoded srcWidth columns of grayscale
|
||||||
@@ -512,7 +615,20 @@ bool JpegToBmpConverter::jpegFileToBmpStreamInternal(HalFile& jpegFile, Print& b
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needsScaling) {
|
if (smoothUpscale) {
|
||||||
|
// One contiguous allocation avoids three heap blocks while keeping smoothing line-buffered.
|
||||||
|
const size_t smoothRowsBytes = static_cast<size_t>(outWidth) * 3;
|
||||||
|
ctx.smoothRows = makeUniqueNoThrow<uint8_t[]>(smoothRowsBytes);
|
||||||
|
if (!ctx.smoothRows) {
|
||||||
|
LOG_ERR("JPG", "OOM: progressive smoothing buffers");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ctx.smoothPrevRow = ctx.smoothRows.get();
|
||||||
|
ctx.smoothCurrRow = ctx.smoothPrevRow + outWidth;
|
||||||
|
ctx.smoothOutRow = ctx.smoothCurrRow + outWidth;
|
||||||
|
LOG_DBG("JPG", "Progressive smoothing: %dx%d -> %dx%d, buffers=%u bytes", ctx.srcWidth, ctx.srcHeight, outWidth,
|
||||||
|
outHeight, static_cast<unsigned>(smoothRowsBytes));
|
||||||
|
} else if (needsScaling) {
|
||||||
ctx.rowAccum = makeUniqueNoThrow<uint32_t[]>(outWidth);
|
ctx.rowAccum = makeUniqueNoThrow<uint32_t[]>(outWidth);
|
||||||
ctx.rowCount = makeUniqueNoThrow<uint32_t[]>(outWidth);
|
ctx.rowCount = makeUniqueNoThrow<uint32_t[]>(outWidth);
|
||||||
if (!ctx.rowAccum || !ctx.rowCount) {
|
if (!ctx.rowAccum || !ctx.rowCount) {
|
||||||
@@ -549,6 +665,10 @@ bool JpegToBmpConverter::jpegFileToBmpStreamInternal(HalFile& jpegFile, Print& b
|
|||||||
|
|
||||||
rc = jpeg->decode(0, 0, 0);
|
rc = jpeg->decode(0, 0, 0);
|
||||||
|
|
||||||
|
if (rc == 1 && ctx.smoothUpscale && !ctx.error) {
|
||||||
|
finishSmoothUpscale(&ctx);
|
||||||
|
}
|
||||||
|
|
||||||
if (rc != 1 || ctx.error) {
|
if (rc != 1 || ctx.error) {
|
||||||
LOG_ERR("JPG", "JPEG decode failed (rc=%d, err=%d)", rc, jpeg->getLastError());
|
LOG_ERR("JPG", "JPEG decode failed (rc=%d, err=%d)", rc, jpeg->getLastError());
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -278,13 +278,18 @@ class XPathParagraphResolver final : public Print {
|
|||||||
path.push_back({name, siblingIndex});
|
path.push_back({name, siblingIndex});
|
||||||
parentStates.emplace_back();
|
parentStates.emplace_back();
|
||||||
|
|
||||||
|
// Count both <p> and <li> as paragraph-like positions, matching how the section
|
||||||
|
// layout tracks them (xpathParagraphIndex and xpathListItemIndex). This ensures
|
||||||
|
// KOReader progress in list items maps to the correct XPath.
|
||||||
if (name == "p") {
|
if (name == "p") {
|
||||||
paragraphCount++;
|
paragraphCount++;
|
||||||
if (paragraphCount == targetParagraph) {
|
} else if (name == "li") {
|
||||||
xpath = buildParagraphXPath(spineIndex, path, 0, 0);
|
paragraphCount++;
|
||||||
stopped = true;
|
}
|
||||||
XML_StopParser(parser, XML_FALSE);
|
if (paragraphCount == targetParagraph) {
|
||||||
}
|
xpath = buildParagraphXPath(spineIndex, path, 0, 0);
|
||||||
|
stopped = true;
|
||||||
|
XML_StopParser(parser, XML_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
depth++;
|
depth++;
|
||||||
|
|||||||
@@ -709,12 +709,13 @@ SavedProgressPosition ProgressMapper::toSavedProgress(const std::shared_ptr<Epub
|
|||||||
float intra =
|
float intra =
|
||||||
(pos.totalPages > 1) ? static_cast<float>(pos.pageNumber) / static_cast<float>(pos.totalPages - 1) : 0.0f;
|
(pos.totalPages > 1) ? static_cast<float>(pos.pageNumber) / static_cast<float>(pos.totalPages - 1) : 0.0f;
|
||||||
result.percentage = epub->calculateProgress(pos.spineIndex, intra);
|
result.percentage = epub->calculateProgress(pos.spineIndex, intra);
|
||||||
// Progress-based XPath correctly handles both <p> and <li> positions.
|
if (pos.hasParagraphIndex && pos.paragraphIndex > 0) {
|
||||||
result.xpath = ChapterXPathResolver::findXPathForProgress(epub, pos.spineIndex, intra);
|
|
||||||
// Fall back to paragraph-index lookup when progress-based resolution fails.
|
|
||||||
if (result.xpath.empty() && pos.hasParagraphIndex && pos.paragraphIndex > 0) {
|
|
||||||
result.xpath = ChapterXPathResolver::findXPathForParagraph(epub, pos.spineIndex, pos.paragraphIndex);
|
result.xpath = ChapterXPathResolver::findXPathForParagraph(epub, pos.spineIndex, pos.paragraphIndex);
|
||||||
}
|
}
|
||||||
|
// Fall back to progress-based XPath, then synthetic progress mapping.
|
||||||
|
if (result.xpath.empty()) {
|
||||||
|
result.xpath = ChapterXPathResolver::findXPathForProgress(epub, pos.spineIndex, intra);
|
||||||
|
}
|
||||||
if (result.xpath.empty()) {
|
if (result.xpath.empty()) {
|
||||||
result.xpath = generateXPath(epub, pos.spineIndex, intra);
|
result.xpath = generateXPath(epub, pos.spineIndex, intra);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
#include "Logging.h"
|
#include "Logging.h"
|
||||||
|
|
||||||
#include <BoardConfig.h>
|
|
||||||
#include <esp_rom_sys.h>
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#define MAX_ENTRY_LEN 256
|
#define MAX_ENTRY_LEN 256
|
||||||
@@ -62,19 +59,9 @@ void logPrintf(const char* level, const char* origin, const char* format, ...) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
va_end(args);
|
va_end(args);
|
||||||
#if FREEINK_LOG_TRANSPORT == FREEINK_LOG_TRANSPORT_USB_CDC_WRITE
|
|
||||||
// Native USB CDC can report false while PlatformIO monitor is attached on
|
|
||||||
// boards like LilyGo T5 S3, so write directly to the CDC object.
|
|
||||||
logSerial.write(reinterpret_cast<const uint8_t*>(buf), strnlen(buf, sizeof(buf)));
|
|
||||||
#elif FREEINK_LOG_TRANSPORT == FREEINK_LOG_TRANSPORT_ROM_PRINTF
|
|
||||||
// IDF/ROM console path for boards whose monitor is attached there during
|
|
||||||
// bring-up, e.g. Sticky.
|
|
||||||
esp_rom_printf("%s", buf);
|
|
||||||
#else
|
|
||||||
if (logSerial) {
|
if (logSerial) {
|
||||||
logSerial.print(buf);
|
logSerial.print(buf);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
addToLogRingBuffer(buf);
|
addToLogRingBuffer(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,7 @@ won't trigger deprecation warnings.
|
|||||||
#define LOG_LEVEL 0
|
#define LOG_LEVEL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The concrete Serial type differs by MCU: HWCDC (native USB CDC on C3/S3) vs
|
static HWCDC& logSerial = Serial;
|
||||||
// HardwareSerial (UART0 on the classic ESP32 / M5Paper). Bind to whatever the
|
|
||||||
// real Serial is here — this is before the `#define Serial` shim below.
|
|
||||||
static decltype(Serial)& logSerial = Serial;
|
|
||||||
|
|
||||||
void logPrintf(const char* level, const char* origin, const char* format, ...);
|
void logPrintf(const char* level, const char* origin, const char* format, ...);
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ OpdsParser::OpdsParser() {
|
|||||||
if (!parser) {
|
if (!parser) {
|
||||||
errorOccured = true;
|
errorOccured = true;
|
||||||
LOG_DBG("OPDS", "Couldn't allocate memory for parser");
|
LOG_DBG("OPDS", "Couldn't allocate memory for parser");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
XML_SetUserData(parser, this);
|
||||||
|
XML_SetElementHandler(parser, startElement, endElement);
|
||||||
|
XML_SetCharacterDataHandler(parser, characterData);
|
||||||
}
|
}
|
||||||
|
|
||||||
OpdsParser::~OpdsParser() { destroyXmlParser(parser); }
|
OpdsParser::~OpdsParser() { destroyXmlParser(parser); }
|
||||||
@@ -20,10 +24,6 @@ size_t OpdsParser::write(uint8_t c) { return write(&c, 1); }
|
|||||||
size_t OpdsParser::write(const uint8_t* xmlData, const size_t length) {
|
size_t OpdsParser::write(const uint8_t* xmlData, const size_t length) {
|
||||||
if (errorOccured) return length;
|
if (errorOccured) return length;
|
||||||
|
|
||||||
XML_SetUserData(parser, this);
|
|
||||||
XML_SetElementHandler(parser, startElement, endElement);
|
|
||||||
XML_SetCharacterDataHandler(parser, characterData);
|
|
||||||
|
|
||||||
const char* currentPos = reinterpret_cast<const char*>(xmlData);
|
const char* currentPos = reinterpret_cast<const char*>(xmlData);
|
||||||
size_t remaining = length;
|
size_t remaining = length;
|
||||||
constexpr size_t chunkSize = 1024;
|
constexpr size_t chunkSize = 1024;
|
||||||
@@ -54,6 +54,7 @@ size_t OpdsParser::write(const uint8_t* xmlData, const size_t length) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OpdsParser::flush() {
|
void OpdsParser::flush() {
|
||||||
|
if (errorOccured || !parser) return;
|
||||||
if (XML_Parse(parser, nullptr, 0, XML_TRUE) != XML_STATUS_OK) {
|
if (XML_Parse(parser, nullptr, 0, XML_TRUE) != XML_STATUS_OK) {
|
||||||
errorOccured = true;
|
errorOccured = true;
|
||||||
destroyXmlParser(parser);
|
destroyXmlParser(parser);
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ std::string Txt::getTitle() const {
|
|||||||
|
|
||||||
// Remove .txt extension
|
// Remove .txt extension
|
||||||
if (FsHelpers::hasTxtExtension(filename)) {
|
if (FsHelpers::hasTxtExtension(filename)) {
|
||||||
filename = filename.substr(0, filename.length() - 4);
|
filename.resize(filename.length() - 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
return filename;
|
return filename;
|
||||||
|
|||||||
+1
-62
@@ -18,11 +18,8 @@ static uint8_t bcdToDec(uint8_t bcd) { return ((bcd >> 4) * 10) + (bcd & 0x0F);
|
|||||||
static uint8_t decToBcd(uint8_t dec) { return ((dec / 10) << 4) | (dec % 10); }
|
static uint8_t decToBcd(uint8_t dec) { return ((dec / 10) << 4) | (dec % 10); }
|
||||||
|
|
||||||
void HalClock::begin() {
|
void HalClock::begin() {
|
||||||
_usesSdkRtc = false;
|
|
||||||
if (!gpio.deviceIsX3()) {
|
if (!gpio.deviceIsX3()) {
|
||||||
_available = _sdkRtc.begin();
|
_available = false;
|
||||||
_usesSdkRtc = _available;
|
|
||||||
LOG_INF("CLK", _available ? "SDK RTC found" : "RTC not found");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,24 +57,6 @@ bool HalClock::getTime(uint8_t& hour, uint8_t& minute) const {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_usesSdkRtc) {
|
|
||||||
Rtc::DateTime dt;
|
|
||||||
if (!_sdkRtc.now(dt)) {
|
|
||||||
if (!_hasCachedTime) return false;
|
|
||||||
_lastPollMs = now;
|
|
||||||
hour = _cachedHour;
|
|
||||||
minute = _cachedMinute;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
_cachedHour = dt.hour;
|
|
||||||
_cachedMinute = dt.minute;
|
|
||||||
_lastPollMs = now;
|
|
||||||
_hasCachedTime = true;
|
|
||||||
hour = _cachedHour;
|
|
||||||
minute = _cachedMinute;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read 3 bytes starting at register 0x00: seconds, minutes, hours
|
// Read 3 bytes starting at register 0x00: seconds, minutes, hours
|
||||||
Wire.beginTransmission(I2C_ADDR_DS3231);
|
Wire.beginTransmission(I2C_ADDR_DS3231);
|
||||||
Wire.write(DS3231_SEC_REG);
|
Wire.write(DS3231_SEC_REG);
|
||||||
@@ -152,25 +131,6 @@ bool HalClock::writeTimeToRTC(uint8_t hour, uint8_t minute, uint8_t second) {
|
|||||||
assert(hour < 24);
|
assert(hour < 24);
|
||||||
assert(minute < 60);
|
assert(minute < 60);
|
||||||
assert(second < 60);
|
assert(second < 60);
|
||||||
if (_usesSdkRtc) {
|
|
||||||
Rtc::DateTime dt;
|
|
||||||
dt.hour = hour;
|
|
||||||
dt.minute = minute;
|
|
||||||
dt.second = second;
|
|
||||||
dt.year = 2000;
|
|
||||||
dt.month = 1;
|
|
||||||
dt.day = 1;
|
|
||||||
if (!_sdkRtc.set(dt)) {
|
|
||||||
LOG_ERR("CLK", "Failed to write time to SDK RTC");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
_lastPollMs = 0;
|
|
||||||
_cachedHour = hour;
|
|
||||||
_cachedMinute = minute;
|
|
||||||
_hasCachedTime = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Wire.beginTransmission(I2C_ADDR_DS3231);
|
Wire.beginTransmission(I2C_ADDR_DS3231);
|
||||||
Wire.write(DS3231_SEC_REG); // Start at register 0x00
|
Wire.write(DS3231_SEC_REG); // Start at register 0x00
|
||||||
Wire.write(decToBcd(second)); // 0x00: Seconds
|
Wire.write(decToBcd(second)); // 0x00: Seconds
|
||||||
@@ -208,27 +168,6 @@ bool HalClock::syncFromNTP() {
|
|||||||
struct tm timeinfo;
|
struct tm timeinfo;
|
||||||
gmtime_r(&now, &timeinfo);
|
gmtime_r(&now, &timeinfo);
|
||||||
|
|
||||||
if (_usesSdkRtc) {
|
|
||||||
Rtc::DateTime dt;
|
|
||||||
dt.year = static_cast<uint16_t>(timeinfo.tm_year + 1900);
|
|
||||||
dt.month = static_cast<uint8_t>(timeinfo.tm_mon + 1);
|
|
||||||
dt.day = static_cast<uint8_t>(timeinfo.tm_mday);
|
|
||||||
dt.hour = static_cast<uint8_t>(timeinfo.tm_hour);
|
|
||||||
dt.minute = static_cast<uint8_t>(timeinfo.tm_min);
|
|
||||||
dt.second = static_cast<uint8_t>(timeinfo.tm_sec);
|
|
||||||
dt.weekday = static_cast<uint8_t>(timeinfo.tm_wday);
|
|
||||||
if (_sdkRtc.set(dt)) {
|
|
||||||
_lastPollMs = 0;
|
|
||||||
_cachedHour = dt.hour;
|
|
||||||
_cachedMinute = dt.minute;
|
|
||||||
_hasCachedTime = true;
|
|
||||||
LOG_INF("CLK", "RTC set to %04u-%02u-%02u %02u:%02u:%02u UTC", dt.year, dt.month, dt.day, dt.hour, dt.minute,
|
|
||||||
dt.second);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (writeTimeToRTC(timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec)) {
|
if (writeTimeToRTC(timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec)) {
|
||||||
LOG_INF("CLK", "RTC set to %02d:%02d:%02d UTC", timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec);
|
LOG_INF("CLK", "RTC set to %02d:%02d:%02d UTC", timeinfo.tm_hour, timeinfo.tm_min, timeinfo.tm_sec);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <Rtc.h>
|
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
|
|
||||||
#include "HalGPIO.h"
|
#include "HalGPIO.h"
|
||||||
@@ -11,8 +10,6 @@ extern HalClock halClock; // Singleton
|
|||||||
|
|
||||||
class HalClock {
|
class HalClock {
|
||||||
bool _available = false;
|
bool _available = false;
|
||||||
bool _usesSdkRtc = false;
|
|
||||||
mutable Rtc _sdkRtc;
|
|
||||||
mutable uint8_t _cachedHour = 0;
|
mutable uint8_t _cachedHour = 0;
|
||||||
mutable uint8_t _cachedMinute = 0;
|
mutable uint8_t _cachedMinute = 0;
|
||||||
mutable bool _hasCachedTime = false;
|
mutable bool _hasCachedTime = false;
|
||||||
|
|||||||
@@ -81,6 +81,27 @@ void HalDisplay::copyGrayscaleBuffers(const uint8_t* lsbBuffer, const uint8_t* m
|
|||||||
einkDisplay.copyGrayscaleBuffers(lsbBuffer, msbBuffer);
|
einkDisplay.copyGrayscaleBuffers(lsbBuffer, msbBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HalDisplay::displayGrayscaleBase(RefreshMode fallback, bool turnOffScreen) {
|
||||||
|
// X3: a HALF fallback means the caller wants a clean base (e.g. the sleep
|
||||||
|
// cover, a full-screen swap from arbitrary prior content). Without this, the
|
||||||
|
// X3 grayscale base takes its gentle differential happy path and the prior
|
||||||
|
// home/reader frame ghosts through the soft aa_pre_bw_mid waveform. Forcing a
|
||||||
|
// resync makes displayGrayscaleBase clear first, matching displayBuffer(HALF).
|
||||||
|
// The reader's FAST path is deliberately left on the differential path so
|
||||||
|
// per-page grayscale stays cheap.
|
||||||
|
if (gpio.deviceIsX3() && fallback == RefreshMode::HALF_REFRESH) {
|
||||||
|
einkDisplay.requestResync(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
einkDisplay.displayGrayscaleBase(convertRefreshMode(fallback), turnOffScreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HalDisplay::preconditionGrayscale() { einkDisplay.preconditionGrayscale(); }
|
||||||
|
|
||||||
|
void HalDisplay::preconditionGrayscale(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
|
||||||
|
einkDisplay.preconditionGrayscale(x, y, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
void HalDisplay::copyGrayscaleLsbBuffers(const uint8_t* lsbBuffer) { einkDisplay.copyGrayscaleLsbBuffers(lsbBuffer); }
|
void HalDisplay::copyGrayscaleLsbBuffers(const uint8_t* lsbBuffer) { einkDisplay.copyGrayscaleLsbBuffers(lsbBuffer); }
|
||||||
|
|
||||||
void HalDisplay::copyGrayscaleMsbBuffers(const uint8_t* msbBuffer) { einkDisplay.copyGrayscaleMsbBuffers(msbBuffer); }
|
void HalDisplay::copyGrayscaleMsbBuffers(const uint8_t* msbBuffer) { einkDisplay.copyGrayscaleMsbBuffers(msbBuffer); }
|
||||||
|
|||||||
@@ -47,6 +47,19 @@ class HalDisplay {
|
|||||||
// Access to frame buffer
|
// Access to frame buffer
|
||||||
uint8_t* getFrameBuffer() const;
|
uint8_t* getFrameBuffer() const;
|
||||||
|
|
||||||
|
// X3 grayscale preconditioning (OEM "AA-pre-BW(mid)" settle pass), windowed
|
||||||
|
// to the gray region in physical panel coordinates (no-arg = full frame).
|
||||||
|
// Call after the BW base frame is displayed and before the grayscale planes
|
||||||
|
// are written; no-op on X4. See EInkDisplay::preconditionGrayscale.
|
||||||
|
void preconditionGrayscale();
|
||||||
|
void preconditionGrayscale(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
|
||||||
|
|
||||||
|
// Display the framebuffer as the base frame for a grayscale overlay that
|
||||||
|
// follows. On X3, HALF fallback first requests a resync to match
|
||||||
|
// displayBuffer(HALF); FAST fallback keeps the OEM differential base waveform
|
||||||
|
// ("AA-pre-BW(mid)"). Other panels display normally with `fallback` mode.
|
||||||
|
void displayGrayscaleBase(RefreshMode fallback = HALF_REFRESH, bool turnOffScreen = false);
|
||||||
|
|
||||||
void copyGrayscaleBuffers(const uint8_t* lsbBuffer, const uint8_t* msbBuffer);
|
void copyGrayscaleBuffers(const uint8_t* lsbBuffer, const uint8_t* msbBuffer);
|
||||||
void copyGrayscaleLsbBuffers(const uint8_t* lsbBuffer);
|
void copyGrayscaleLsbBuffers(const uint8_t* lsbBuffer);
|
||||||
void copyGrayscaleMsbBuffers(const uint8_t* msbBuffer);
|
void copyGrayscaleMsbBuffers(const uint8_t* msbBuffer);
|
||||||
|
|||||||
+17
-79
@@ -1,6 +1,5 @@
|
|||||||
#include <HalGPIO.h>
|
#include <HalGPIO.h>
|
||||||
#include <Logging.h>
|
#include <Logging.h>
|
||||||
#include <PowerManager.h>
|
|
||||||
#include <Preferences.h>
|
#include <Preferences.h>
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
@@ -193,44 +192,14 @@ HalGPIO::DeviceType detectDeviceTypeWithFingerprint() {
|
|||||||
|
|
||||||
void HalGPIO::begin() {
|
void HalGPIO::begin() {
|
||||||
inputMgr.begin();
|
inputMgr.begin();
|
||||||
#if FREEINK_MCU_C3
|
|
||||||
// Claim the shared SPI bus with the X4/X3 display+SD pins. These EPD_* pin
|
|
||||||
// macros are hardcoded C3/Xteink values, so this pre-claim is only valid on the
|
|
||||||
// C3 family. On other boards (M5Paper's IT8951, Sticky's SSD1677, ...) the SDK
|
|
||||||
// driver and SDCardManager bring up SPI from BoardConfig::ACTIVE pins; pre-
|
|
||||||
// claiming here would stick (SPIClass::begin early-returns once the bus is
|
|
||||||
// started) and leave the display/SD on the wrong pins.
|
|
||||||
SPI.begin(EPD_SCLK, SPI_MISO, EPD_MOSI, EPD_CS);
|
SPI.begin(EPD_SCLK, SPI_MISO, EPD_MOSI, EPD_CS);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if FREEINK_MCU_C3
|
|
||||||
_deviceType = detectDeviceTypeWithFingerprint();
|
_deviceType = detectDeviceTypeWithFingerprint();
|
||||||
|
|
||||||
// Sync the runtime board profile to the detected device NOW, before any I2C
|
|
||||||
// consumer begins. powerManager/clock/tilt begin() run immediately after this
|
|
||||||
// in setup() and rely on BoardConfig::ACTIVE: HalPowerManager only calls
|
|
||||||
// Wire.begin() when the active profile has an I2C gauge (gaugeAddr != 0), and
|
|
||||||
// the X3 clock/tilt raw-Wire paths assume that begin happened. The dual X3+X4
|
|
||||||
// binary boots as X4 (gaugeAddr 0), so without this the X4 profile stays active
|
|
||||||
// through those begins, Wire is never (re)initialised after the detection probe
|
|
||||||
// end()s it, and every X3 read fails with lock==NULL ("could not acquire lock"
|
|
||||||
// / "NULL TX buffer pointer"). FreeInkDisplay also calls selectDevice() later,
|
|
||||||
// but that is after the I2C consumers — too late. selectDevice() is idempotent.
|
|
||||||
BoardConfig::selectDevice(deviceIsX3() ? BoardConfig::Board::XteinkX3 : BoardConfig::Board::XteinkX4);
|
|
||||||
|
|
||||||
if (deviceIsX4()) {
|
if (deviceIsX4()) {
|
||||||
pinMode(BAT_GPIO0, INPUT);
|
pinMode(BAT_GPIO0, INPUT);
|
||||||
pinMode(UART0_RXD, INPUT);
|
pinMode(UART0_RXD, INPUT);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
// Non-C3 boards (S3/ESP32) are single-device builds; their pins, panel, and
|
|
||||||
// battery backend all come from BoardConfig::ACTIVE. The X3/X4 fingerprint probe
|
|
||||||
// targets Xteink C3 hardware and drives Wire on X3_I2C_SDA/SCL (GPIO20/0) — which
|
|
||||||
// collides with this board's own I2C (e.g. Sticky's BQ27220 gauge shares GPIO0)
|
|
||||||
// and reconfigures strapping pins. Skip it; _deviceType stays X4 ("not X3"),
|
|
||||||
// the correct non-X3 branch for every deviceIsX3() consumer.
|
|
||||||
_deviceType = DeviceType::X4;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HalGPIO::update() {
|
void HalGPIO::update() {
|
||||||
@@ -256,55 +225,30 @@ unsigned long HalGPIO::getHeldTime() const { return inputMgr.getHeldTime(); }
|
|||||||
|
|
||||||
unsigned long HalGPIO::getPowerButtonHeldTime() const { return inputMgr.getPowerButtonHeldTime(); }
|
unsigned long HalGPIO::getPowerButtonHeldTime() const { return inputMgr.getPowerButtonHeldTime(); }
|
||||||
|
|
||||||
bool HalGPIO::wasTouchTap(float& nx, float& ny) const { return inputMgr.wasTouchTap(nx, ny); }
|
|
||||||
|
|
||||||
bool HalGPIO::wasTouchDown(float& nx, float& ny) const { return inputMgr.wasTouchPressedAt(nx, ny); }
|
|
||||||
|
|
||||||
bool HalGPIO::isTouchTapCandidate(float& nx, float& ny, unsigned long& heldMs) const {
|
|
||||||
return inputMgr.isTouchTapCandidate(nx, ny, heldMs);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long HalGPIO::lastTouchHeldMs() const { return inputMgr.lastTouchHeldMs(); }
|
|
||||||
|
|
||||||
bool HalGPIO::wasSwipe(float& nxStart, float& nyStart, float& nxEnd, float& nyEnd) const {
|
|
||||||
return inputMgr.wasSwipe(nxStart, nyStart, nxEnd, nyEnd);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HalGPIO::hasTouch() const { return inputMgr.hasTouch(); }
|
|
||||||
|
|
||||||
bool HalGPIO::wasTouchActivity() const { return inputMgr.wasTouchActivity(); }
|
|
||||||
|
|
||||||
bool HalGPIO::isXteinkDevice() const {
|
|
||||||
const auto board = BoardConfig::ACTIVE.board;
|
|
||||||
return board == BoardConfig::Board::XteinkX3 || board == BoardConfig::Board::XteinkX4;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HalGPIO::startDeepSleep() {
|
void HalGPIO::startDeepSleep() {
|
||||||
// Ensure that the power button has been released to avoid immediately turning back on if you're holding it
|
// Ensure that the power button has been released to avoid immediately turning back on if you're holding it
|
||||||
while (inputMgr.isPressed(BTN_POWER)) {
|
while (inputMgr.isPressed(BTN_POWER)) {
|
||||||
delay(50);
|
delay(50);
|
||||||
inputMgr.update();
|
inputMgr.update();
|
||||||
}
|
}
|
||||||
freeink::PowerManager::armPowerButtonWakeup();
|
// Arm the wakeup trigger *after* the button is released
|
||||||
freeink::PowerManager::deepSleep();
|
esp_deep_sleep_enable_gpio_wakeup(1ULL << InputManager::POWER_BUTTON_PIN, ESP_GPIO_WAKEUP_GPIO_LOW);
|
||||||
|
// Enter Deep Sleep
|
||||||
|
esp_deep_sleep_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HalGPIO::verifyPowerButtonWakeup(uint16_t requiredDurationMs, bool shortPressAllowed) {
|
void HalGPIO::verifyPowerButtonWakeup(uint16_t requiredDurationMs, bool shortPressAllowed) {
|
||||||
if (BoardConfig::ACTIVE.input.power < 0) {
|
|
||||||
// No readable power-button input pin: can't verify a hold, so don't sleep.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#if defined(FREEINK_DEVICE_M5PAPER) && FREEINK_DEVICE_M5PAPER
|
|
||||||
// M5Paper: power-on is a hardware latch and the "power button" is the rotary
|
|
||||||
// push (G38), shared with Confirm. A USB/flash cold boot is indistinguishable
|
|
||||||
// from an intentional power-on hold here, so skip the X4-style anti-accidental-
|
|
||||||
// wake check and always boot. G38 still serves as the deep-sleep wake source.
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
if (shortPressAllowed) {
|
if (shortPressAllowed) {
|
||||||
// Fast path - no duration check needed
|
// Fast path - no duration check needed
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// TODO: Intermittent edge case remains: a single tap followed by another single tap
|
||||||
|
// can still power on the device. Tighten wake debounce/state handling here.
|
||||||
|
|
||||||
|
// Calibrate: subtract boot time already elapsed, assuming button held since boot
|
||||||
|
const uint16_t calibration = millis();
|
||||||
|
const uint16_t calibratedDuration = (calibration < requiredDurationMs) ? (requiredDurationMs - calibration) : 1;
|
||||||
|
|
||||||
const auto start = millis();
|
const auto start = millis();
|
||||||
inputMgr.update();
|
inputMgr.update();
|
||||||
// inputMgr.isPressed() may take up to ~500ms to return correct state
|
// inputMgr.isPressed() may take up to ~500ms to return correct state
|
||||||
@@ -313,12 +257,11 @@ void HalGPIO::verifyPowerButtonWakeup(uint16_t requiredDurationMs, bool shortPre
|
|||||||
inputMgr.update();
|
inputMgr.update();
|
||||||
}
|
}
|
||||||
if (inputMgr.isPressed(BTN_POWER)) {
|
if (inputMgr.isPressed(BTN_POWER)) {
|
||||||
const auto holdStart = millis();
|
|
||||||
do {
|
do {
|
||||||
delay(10);
|
delay(10);
|
||||||
inputMgr.update();
|
inputMgr.update();
|
||||||
} while (inputMgr.isPressed(BTN_POWER) && millis() - holdStart < requiredDurationMs);
|
} while (inputMgr.isPressed(BTN_POWER) && inputMgr.getPowerButtonHeldTime() < calibratedDuration);
|
||||||
if (millis() - holdStart < requiredDurationMs) {
|
if (inputMgr.getPowerButtonHeldTime() < calibratedDuration) {
|
||||||
startDeepSleep();
|
startDeepSleep();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -339,10 +282,8 @@ bool HalGPIO::isUsbConnected() const {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (BoardConfig::ACTIVE.usbDetect < 0) {
|
// U0RXD/GPIO20 reads HIGH when USB is connected
|
||||||
return false;
|
return digitalRead(UART0_RXD) == HIGH;
|
||||||
}
|
|
||||||
return digitalRead(BoardConfig::ACTIVE.usbDetect) == HIGH;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HalGPIO::WakeupReason HalGPIO::getWakeupReason() const {
|
HalGPIO::WakeupReason HalGPIO::getWakeupReason() const {
|
||||||
@@ -351,11 +292,8 @@ HalGPIO::WakeupReason HalGPIO::getWakeupReason() const {
|
|||||||
|
|
||||||
const bool usbConnected = isUsbConnected();
|
const bool usbConnected = isUsbConnected();
|
||||||
|
|
||||||
if (resetReason == ESP_RST_DEEPSLEEP &&
|
if ((wakeupCause == ESP_SLEEP_WAKEUP_UNDEFINED && resetReason == ESP_RST_POWERON && !usbConnected) ||
|
||||||
(wakeupCause == ESP_SLEEP_WAKEUP_GPIO || wakeupCause == ESP_SLEEP_WAKEUP_EXT1)) {
|
(wakeupCause == ESP_SLEEP_WAKEUP_GPIO && resetReason == ESP_RST_DEEPSLEEP && usbConnected)) {
|
||||||
return WakeupReason::PowerButton;
|
|
||||||
}
|
|
||||||
if (wakeupCause == ESP_SLEEP_WAKEUP_UNDEFINED && resetReason == ESP_RST_POWERON && !usbConnected) {
|
|
||||||
return WakeupReason::PowerButton;
|
return WakeupReason::PowerButton;
|
||||||
}
|
}
|
||||||
if (wakeupCause == ESP_SLEEP_WAKEUP_UNDEFINED && resetReason == ESP_RST_UNKNOWN && usbConnected) {
|
if (wakeupCause == ESP_SLEEP_WAKEUP_UNDEFINED && resetReason == ESP_RST_UNKNOWN && usbConnected) {
|
||||||
|
|||||||
@@ -59,11 +59,6 @@ class HalGPIO {
|
|||||||
inline bool deviceIsX3() const { return _deviceType == DeviceType::X3; }
|
inline bool deviceIsX3() const { return _deviceType == DeviceType::X3; }
|
||||||
inline bool deviceIsX4() const { return _deviceType == DeviceType::X4; }
|
inline bool deviceIsX4() const { return _deviceType == DeviceType::X4; }
|
||||||
|
|
||||||
// True on the Xteink X3/X4 boards. Unlike deviceIsX3/X4 (which both stay "X4"
|
|
||||||
// on non-C3 boards), this keys off BoardConfig::ACTIVE.board, so it reliably
|
|
||||||
// gates Xteink-only features (sunlight fix) and non-Xteink-only ones (touch).
|
|
||||||
bool isXteinkDevice() const;
|
|
||||||
|
|
||||||
// Start button GPIO and setup SPI for screen and SD card
|
// Start button GPIO and setup SPI for screen and SD card
|
||||||
void begin();
|
void begin();
|
||||||
|
|
||||||
@@ -77,34 +72,6 @@ class HalGPIO {
|
|||||||
unsigned long getHeldTime() const;
|
unsigned long getHeldTime() const;
|
||||||
unsigned long getPowerButtonHeldTime() const;
|
unsigned long getPowerButtonHeldTime() const;
|
||||||
|
|
||||||
// Touch: one-shot tap with the release position normalized 0..1 in the panel's
|
|
||||||
// native orientation. Returns false on non-touch devices. (Reusable gesture
|
|
||||||
// primitive; see MappedInputManager for the top-left = Back mapping.)
|
|
||||||
bool wasTouchTap(float& nx, float& ny) const;
|
|
||||||
|
|
||||||
// Press-edge of a touch: true on touch-down with the down position normalized
|
|
||||||
// 0..1 (panel native). For showing the pressed/selected element before release.
|
|
||||||
bool wasTouchDown(float& nx, float& ny) const;
|
|
||||||
|
|
||||||
// True while a touch remains within tap slop; writes touch-down position and held time.
|
|
||||||
bool isTouchTapCandidate(float& nx, float& ny, unsigned long& heldMs) const;
|
|
||||||
|
|
||||||
// Duration (ms) of the last touch contact, latched on release. Valid on the
|
|
||||||
// release frame (alongside wasTouchTap). For tap-vs-long-press decisions.
|
|
||||||
unsigned long lastTouchHeldMs() const;
|
|
||||||
|
|
||||||
// Swipe (flick) gesture on the release frame: writes the start/end positions
|
|
||||||
// normalized 0..1 in the panel's native frame (map via GfxRenderer::tapToLogical).
|
|
||||||
// A swipe also raises wasTouchTap(), so check this first. False on non-touch.
|
|
||||||
bool wasSwipe(float& nxStart, float& nyStart, float& nxEnd, float& nyEnd) const;
|
|
||||||
|
|
||||||
// True if a touch controller is present/active (runtime gate; false on the C3).
|
|
||||||
bool hasTouch() const;
|
|
||||||
|
|
||||||
// True if a touch press or release happened this frame (the touch analogue of
|
|
||||||
// wasAnyPressed/Released), for resetting idle/sleep timers and CPU frequency.
|
|
||||||
bool wasTouchActivity() const;
|
|
||||||
|
|
||||||
// Setup wake up GPIO and enter deep sleep
|
// Setup wake up GPIO and enter deep sleep
|
||||||
void startDeepSleep();
|
void startDeepSleep();
|
||||||
|
|
||||||
|
|||||||
+25
-45
@@ -1,7 +1,6 @@
|
|||||||
#include "HalPowerManager.h"
|
#include "HalPowerManager.h"
|
||||||
|
|
||||||
#include <Logging.h>
|
#include <Logging.h>
|
||||||
#include <PowerManager.h>
|
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include <esp_sleep.h>
|
#include <esp_sleep.h>
|
||||||
|
|
||||||
@@ -11,32 +10,15 @@
|
|||||||
|
|
||||||
HalPowerManager powerManager; // Singleton instance
|
HalPowerManager powerManager; // Singleton instance
|
||||||
|
|
||||||
namespace {
|
|
||||||
// The fuel gauge's I2C controller (Wire or Wire1) per the active board profile.
|
|
||||||
// On single-bus SoCs (ESP32-C3, SOC_I2C_NUM == 1) Wire1 doesn't exist, so always
|
|
||||||
// use Wire. On Sticky the gauge is on Wire1 so it doesn't fight the GT911 touch,
|
|
||||||
// which owns Wire.
|
|
||||||
TwoWire& gaugeWire() {
|
|
||||||
#if SOC_I2C_NUM > 1
|
|
||||||
if (BoardConfig::ACTIVE.batteryGauge.i2cBus == 1) return Wire1;
|
|
||||||
#endif
|
|
||||||
return Wire;
|
|
||||||
}
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
void HalPowerManager::begin() {
|
void HalPowerManager::begin() {
|
||||||
const auto& gauge = BoardConfig::ACTIVE.batteryGauge;
|
if (gpio.deviceIsX3()) {
|
||||||
if (gauge.gaugeAddr != 0) {
|
// X3 uses an I2C fuel gauge for battery monitoring.
|
||||||
// Board has an I2C fuel gauge (X3, LilyGo, Sticky, ...). Pins/freq come from
|
// I2C init must come AFTER gpio.begin() so early hardware detection/probes are finished.
|
||||||
// the active board profile, not hardcoded X3 values. I2C init must come AFTER
|
Wire.begin(X3_I2C_SDA, X3_I2C_SCL, X3_I2C_FREQ);
|
||||||
// gpio.begin() so early hardware detection/probes are finished.
|
Wire.setTimeOut(4);
|
||||||
gaugeWire().begin(gauge.i2cSda, gauge.i2cScl, gauge.i2cHz);
|
|
||||||
gaugeWire().setTimeOut(4);
|
|
||||||
_batteryUseI2C = true;
|
_batteryUseI2C = true;
|
||||||
} else if (BoardConfig::ACTIVE.batteryAdc >= 0) {
|
} else {
|
||||||
// ADC-sensed board (X4: GPIO0, M5Paper: GPIO35). Skip when the profile leaves
|
pinMode(BAT_GPIO0, INPUT);
|
||||||
// batteryAdc unassigned (PIN_UNASSIGNED) — pinMode(255) faults the GPIO mux.
|
|
||||||
pinMode(BoardConfig::ACTIVE.batteryAdc, INPUT);
|
|
||||||
}
|
}
|
||||||
normalFreq = getCpuFrequencyMhz();
|
normalFreq = getCpuFrequencyMhz();
|
||||||
modeMutex = xSemaphoreCreateMutex();
|
modeMutex = xSemaphoreCreateMutex();
|
||||||
@@ -94,19 +76,22 @@ void HalPowerManager::startDeepSleep(HalGPIO& gpio) const {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Pre-sleep routines from the original firmware
|
// Pre-sleep routines from the original firmware
|
||||||
#if !SOC_PM_SUPPORT_EXT1_WAKEUP // RISC-V (C3 / X4)
|
|
||||||
// GPIO13 is connected to battery latch MOSFET, we need to make sure it's low during sleep
|
// GPIO13 is connected to battery latch MOSFET, we need to make sure it's low during sleep
|
||||||
// Note that this means the MCU will be completely powered off during sleep, including RTC
|
// Note that this means the MCU will be completely powered off during sleep, including RTC
|
||||||
// (X4-specific: on classic ESP32/M5Paper GPIO13 is SD MISO, so this is skipped.)
|
|
||||||
constexpr gpio_num_t GPIO_SPIWP = GPIO_NUM_13;
|
constexpr gpio_num_t GPIO_SPIWP = GPIO_NUM_13;
|
||||||
gpio_set_direction(GPIO_SPIWP, GPIO_MODE_OUTPUT);
|
gpio_set_direction(GPIO_SPIWP, GPIO_MODE_OUTPUT);
|
||||||
gpio_set_level(GPIO_SPIWP, 0);
|
gpio_set_level(GPIO_SPIWP, 0);
|
||||||
esp_sleep_config_gpio_isolate();
|
esp_sleep_config_gpio_isolate();
|
||||||
gpio_deep_sleep_hold_en();
|
gpio_deep_sleep_hold_en();
|
||||||
gpio_hold_en(GPIO_SPIWP);
|
gpio_hold_en(GPIO_SPIWP);
|
||||||
#endif
|
pinMode(InputManager::POWER_BUTTON_PIN, INPUT_PULLUP);
|
||||||
freeink::PowerManager::armPowerButtonWakeup();
|
// Arm the wakeup trigger *after* the button is released
|
||||||
freeink::PowerManager::deepSleep();
|
// Note: this is only useful for waking up on USB power. On battery, the MCU will be completely powered off, so the
|
||||||
|
// power button is hard-wired to briefly provide power to the MCU, waking it up regardless of the wakeup source
|
||||||
|
// configuration
|
||||||
|
esp_deep_sleep_enable_gpio_wakeup(1ULL << InputManager::POWER_BUTTON_PIN, ESP_GPIO_WAKEUP_GPIO_LOW);
|
||||||
|
// Enter Deep Sleep
|
||||||
|
esp_deep_sleep_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t HalPowerManager::getBatteryPercentage() const {
|
uint16_t HalPowerManager::getBatteryPercentage() const {
|
||||||
@@ -116,32 +101,27 @@ uint16_t HalPowerManager::getBatteryPercentage() const {
|
|||||||
return _batteryCachedPercent;
|
return _batteryCachedPercent;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read SOC directly from the I2C fuel gauge (16-bit LE register). Gauge
|
// Read SOC directly from I2C fuel gauge (16-bit LE register).
|
||||||
// address comes from the active board profile (all current gauges are
|
// On I2C error, keep last known value to avoid UI jitter/slowdowns.
|
||||||
// BQ27220-class, SOC at 0x2C). On I2C error, keep last known value to avoid
|
Wire.beginTransmission(I2C_ADDR_BQ27220);
|
||||||
// UI jitter/slowdowns.
|
Wire.write(BQ27220_SOC_REG);
|
||||||
const uint8_t gaugeAddr = BoardConfig::ACTIVE.batteryGauge.gaugeAddr;
|
if (Wire.endTransmission(false) != 0) {
|
||||||
TwoWire& w = gaugeWire();
|
|
||||||
w.beginTransmission(gaugeAddr);
|
|
||||||
w.write(BQ27220_SOC_REG);
|
|
||||||
if (w.endTransmission(false) != 0) {
|
|
||||||
_batteryLastPollMs = now;
|
_batteryLastPollMs = now;
|
||||||
return _batteryCachedPercent;
|
return _batteryCachedPercent;
|
||||||
}
|
}
|
||||||
w.requestFrom(gaugeAddr, (uint8_t)2);
|
Wire.requestFrom(I2C_ADDR_BQ27220, (uint8_t)2);
|
||||||
if (w.available() < 2) {
|
if (Wire.available() < 2) {
|
||||||
_batteryLastPollMs = now;
|
_batteryLastPollMs = now;
|
||||||
return _batteryCachedPercent;
|
return _batteryCachedPercent;
|
||||||
}
|
}
|
||||||
const uint8_t lo = w.read();
|
const uint8_t lo = Wire.read();
|
||||||
const uint8_t hi = w.read();
|
const uint8_t hi = Wire.read();
|
||||||
const uint16_t soc = (hi << 8) | lo;
|
const uint16_t soc = (hi << 8) | lo;
|
||||||
_batteryCachedPercent = soc > 100 ? 100 : soc;
|
_batteryCachedPercent = soc > 100 ? 100 : soc;
|
||||||
_batteryLastPollMs = now;
|
_batteryLastPollMs = now;
|
||||||
return _batteryCachedPercent;
|
return _batteryCachedPercent;
|
||||||
}
|
}
|
||||||
// ADC pin from the active profile (X4 GPIO0 / M5Paper GPIO35); default 2:1 divider.
|
static const BatteryMonitor battery = BatteryMonitor(BAT_GPIO0);
|
||||||
static const BatteryMonitor battery = BatteryMonitor(BoardConfig::ACTIVE.batteryAdc);
|
|
||||||
|
|
||||||
// smooth the battery %.
|
// smooth the battery %.
|
||||||
if (_batteryCachedPercent == 0) {
|
if (_batteryCachedPercent == 0) {
|
||||||
|
|||||||
@@ -28,16 +28,7 @@ class HalPowerManager {
|
|||||||
SemaphoreHandle_t modeMutex = nullptr; // Protect access to currentLockMode
|
SemaphoreHandle_t modeMutex = nullptr; // Protect access to currentLockMode
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// On PSRAM boards (classic ESP32 / M5Paper) the APB clock follows the CPU below
|
static constexpr int LOW_POWER_FREQ = 10; // MHz
|
||||||
// 80 MHz, and APB clocks both the SD SPI bus and the 80 MHz PSRAM (which holds
|
|
||||||
// the framebuffer). Dropping to 10 MHz breaks SD writes and PSRAM, so floor the
|
|
||||||
// low-power CPU at 80 MHz (APB stays pinned at 80 for CPU 80/160/240, so power
|
|
||||||
// still drops from the 240 MHz default while SD/PSRAM stay stable).
|
|
||||||
#if defined(BOARD_HAS_PSRAM)
|
|
||||||
static constexpr int LOW_POWER_FREQ = 80; // MHz (APB-safe floor for PSRAM/SD)
|
|
||||||
#else
|
|
||||||
static constexpr int LOW_POWER_FREQ = 10; // MHz
|
|
||||||
#endif
|
|
||||||
static constexpr unsigned long IDLE_POWER_SAVING_MS = 3000; // ms
|
static constexpr unsigned long IDLE_POWER_SAVING_MS = 3000; // ms
|
||||||
static constexpr unsigned long BATTERY_POLL_MS = 1500; // ms
|
static constexpr unsigned long BATTERY_POLL_MS = 1500; // ms
|
||||||
|
|
||||||
|
|||||||
@@ -38,13 +38,6 @@ void IRAM_ATTR __wrap_panic_print_backtrace(const void* frame, int core) {
|
|||||||
__real_panic_print_backtrace(frame, core);
|
__real_panic_print_backtrace(frame, core);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if !__riscv
|
|
||||||
// RvExcFrame and the flat SP scan below are RISC-V-only (C3). On Xtensa
|
|
||||||
// (classic ESP32 / S3) the exception frame is XtExcFrame with windowed-register
|
|
||||||
// unwinding, so fall back to the default backtrace.
|
|
||||||
__real_panic_print_backtrace(frame, core);
|
|
||||||
return;
|
|
||||||
#else
|
|
||||||
for (size_t i = 0; i < MAX_PANIC_STACK_DEPTH; i++) {
|
for (size_t i = 0; i < MAX_PANIC_STACK_DEPTH; i++) {
|
||||||
panicStack[i].sp = 0;
|
panicStack[i].sp = 0;
|
||||||
}
|
}
|
||||||
@@ -72,7 +65,6 @@ void IRAM_ATTR __wrap_panic_print_backtrace(const void* frame, int core) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
__real_panic_print_backtrace(frame, core);
|
__real_panic_print_backtrace(frame, core);
|
||||||
#endif // __riscv
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,15 +26,6 @@ bool HalTiltSensor::readReg(uint8_t reg, uint8_t* val) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool HalTiltSensor::readGyro(float& gx, float& gy, float& gz) const {
|
bool HalTiltSensor::readGyro(float& gx, float& gy, float& gz) const {
|
||||||
if (_backend == Backend::SdkImu) {
|
|
||||||
Imu::Sample sample;
|
|
||||||
if (!_sdkImu.read(sample)) return false;
|
|
||||||
gx = sample.gx;
|
|
||||||
gy = sample.gy;
|
|
||||||
gz = sample.gz;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Wire.beginTransmission(_i2cAddr);
|
Wire.beginTransmission(_i2cAddr);
|
||||||
Wire.write(REG_GX_L); // Start reading at Gyro X Low
|
Wire.write(REG_GX_L); // Start reading at Gyro X Low
|
||||||
if (Wire.endTransmission(false) != 0) {
|
if (Wire.endTransmission(false) != 0) {
|
||||||
@@ -61,22 +52,11 @@ bool HalTiltSensor::readGyro(float& gx, float& gy, float& gz) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void HalTiltSensor::begin() {
|
void HalTiltSensor::begin() {
|
||||||
_backend = Backend::None;
|
|
||||||
if (!gpio.deviceIsX3()) {
|
if (!gpio.deviceIsX3()) {
|
||||||
_available = _sdkImu.begin();
|
_available = false;
|
||||||
if (!_available) {
|
|
||||||
LOG_ERR("GYR", "SDK IMU not found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_backend = Backend::SdkImu;
|
|
||||||
_initMs = millis();
|
|
||||||
_lastPollMs = millis();
|
|
||||||
LOG_INF("GYR", "SDK IMU initialized");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_backend = Backend::Qmi8658;
|
|
||||||
|
|
||||||
// Try primary address, then alternate
|
// Try primary address, then alternate
|
||||||
uint8_t whoami = 0;
|
uint8_t whoami = 0;
|
||||||
_i2cAddr = I2C_ADDR_QMI8658;
|
_i2cAddr = I2C_ADDR_QMI8658;
|
||||||
@@ -109,14 +89,6 @@ bool HalTiltSensor::wake() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_backend == Backend::SdkImu) {
|
|
||||||
_lastPollMs = millis();
|
|
||||||
_lastTiltMs = millis();
|
|
||||||
_wakeMs = millis();
|
|
||||||
_isAwake = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wait for init to complete before waking
|
// Wait for init to complete before waking
|
||||||
if ((millis() - _initMs) < SLEEP_STABILIZE_MS) {
|
if ((millis() - _initMs) < SLEEP_STABILIZE_MS) {
|
||||||
return false;
|
return false;
|
||||||
@@ -139,13 +111,6 @@ bool HalTiltSensor::deepSleep() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_backend == Backend::SdkImu) {
|
|
||||||
clearPendingEvents();
|
|
||||||
_inTilt = false;
|
|
||||||
_isAwake = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((millis() - _wakeMs) < SLEEP_STABILIZE_MS) {
|
if ((millis() - _wakeMs) < SLEEP_STABILIZE_MS) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <Imu.h>
|
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
|
|
||||||
#include "HalGPIO.h"
|
#include "HalGPIO.h"
|
||||||
@@ -19,12 +18,8 @@ class HalTiltSensor;
|
|||||||
extern HalTiltSensor halTiltSensor; // Singleton
|
extern HalTiltSensor halTiltSensor; // Singleton
|
||||||
|
|
||||||
class HalTiltSensor {
|
class HalTiltSensor {
|
||||||
enum class Backend : uint8_t { None, Qmi8658, SdkImu };
|
|
||||||
|
|
||||||
bool _available = false;
|
bool _available = false;
|
||||||
Backend _backend = Backend::None;
|
|
||||||
uint8_t _i2cAddr = 0;
|
uint8_t _i2cAddr = 0;
|
||||||
mutable Imu _sdkImu;
|
|
||||||
|
|
||||||
// Tilt gesture state machine
|
// Tilt gesture state machine
|
||||||
bool _tiltForwardEvent = false; // Consumed by wasTiltedForward()
|
bool _tiltForwardEvent = false; // Consumed by wasTiltedForward()
|
||||||
|
|||||||
+11
-79
@@ -4,7 +4,7 @@ build_cache_dir = .cache
|
|||||||
extra_configs = platformio.local.ini
|
extra_configs = platformio.local.ini
|
||||||
|
|
||||||
[crosspoint]
|
[crosspoint]
|
||||||
version = 1.3.0
|
version = 1.4.1
|
||||||
|
|
||||||
[base]
|
[base]
|
||||||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip
|
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.37/platform-espressif32.zip
|
||||||
@@ -35,6 +35,8 @@ build_flags =
|
|||||||
# Increase PNG scanline buffer to support up to 2048px wide images
|
# Increase PNG scanline buffer to support up to 2048px wide images
|
||||||
# Default is (320*4+1)*2=2562, we need more for larger images
|
# Default is (320*4+1)*2=2562, we need more for larger images
|
||||||
-DPNG_MAX_BUFFERED_PIXELS=16416
|
-DPNG_MAX_BUFFERED_PIXELS=16416
|
||||||
|
-DFREEINK_DEVICE_X4=1
|
||||||
|
-DFREEINK_DEVICE_X3=1
|
||||||
-Wno-bidi-chars
|
-Wno-bidi-chars
|
||||||
-Wl,--wrap=panic_print_backtrace,--wrap=panic_abort,--wrap=bootloader_common_check_efuse_blk_validity
|
-Wl,--wrap=panic_print_backtrace,--wrap=panic_abort,--wrap=bootloader_common_check_efuse_blk_validity
|
||||||
-fno-exceptions
|
-fno-exceptions
|
||||||
@@ -55,10 +57,7 @@ extra_scripts =
|
|||||||
pre:scripts/patch_jpegdec.py
|
pre:scripts/patch_jpegdec.py
|
||||||
post:scripts/register_unit_tests_target.py
|
post:scripts/register_unit_tests_target.py
|
||||||
|
|
||||||
; Libraries — FreeInk SDK (git submodule at ./freeink-sdk). The left-hand names
|
; Libraries
|
||||||
; are the include paths the firmware already uses (<EInkDisplay.h>, etc.); FreeInk's
|
|
||||||
; compat shim preserves them. BoardConfig + PowerManager are FreeInk-only and
|
|
||||||
; required (device profiles + the SoC-correct deep-sleep wakeup the HAL relies on).
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
BatteryMonitor=symlink://freeink-sdk/libs/hardware/BatteryMonitor
|
BatteryMonitor=symlink://freeink-sdk/libs/hardware/BatteryMonitor
|
||||||
InputManager=symlink://freeink-sdk/libs/hardware/InputManager
|
InputManager=symlink://freeink-sdk/libs/hardware/InputManager
|
||||||
@@ -66,8 +65,6 @@ lib_deps =
|
|||||||
SDCardManager=symlink://freeink-sdk/libs/hardware/SDCardManager
|
SDCardManager=symlink://freeink-sdk/libs/hardware/SDCardManager
|
||||||
BoardConfig=symlink://freeink-sdk/libs/hardware/BoardConfig
|
BoardConfig=symlink://freeink-sdk/libs/hardware/BoardConfig
|
||||||
PowerManager=symlink://freeink-sdk/libs/hardware/PowerManager
|
PowerManager=symlink://freeink-sdk/libs/hardware/PowerManager
|
||||||
Rtc=symlink://freeink-sdk/libs/hardware/Rtc
|
|
||||||
Imu=symlink://freeink-sdk/libs/hardware/Imu
|
|
||||||
FreeInkUI=symlink://freeink-sdk/libs/ui/FreeInkUI
|
FreeInkUI=symlink://freeink-sdk/libs/ui/FreeInkUI
|
||||||
Icons=symlink://freeink-sdk/libs/assets/Icons
|
Icons=symlink://freeink-sdk/libs/assets/Icons
|
||||||
bblanchon/ArduinoJson @ 7.4.2
|
bblanchon/ArduinoJson @ 7.4.2
|
||||||
@@ -76,100 +73,35 @@ lib_deps =
|
|||||||
https://github.com/bitbank2/JPEGDEC.git#86282979224c8a32fd51e091ed5a35b0c699a52b
|
https://github.com/bitbank2/JPEGDEC.git#86282979224c8a32fd51e091ed5a35b0c699a52b
|
||||||
links2004/WebSockets @ 2.7.3
|
links2004/WebSockets @ 2.7.3
|
||||||
|
|
||||||
; ESP32-C3 device set: X3 + X4 compiled into one binary, runtime-selected after
|
[env:default]
|
||||||
; the I2C fingerprint. FreeInk requires an explicit device selection, so the C3
|
|
||||||
; envs extend this instead of [base] directly. (M5Paper is a different MCU family
|
|
||||||
; and selects its own device below.)
|
|
||||||
[c3]
|
|
||||||
extends = base
|
extends = base
|
||||||
build_flags =
|
build_flags =
|
||||||
${base.build_flags}
|
${base.build_flags}
|
||||||
-DFREEINK_DEVICE_X3=1
|
|
||||||
-DFREEINK_DEVICE_X4=1
|
|
||||||
|
|
||||||
[env:default]
|
|
||||||
extends = c3
|
|
||||||
build_flags =
|
|
||||||
${c3.build_flags}
|
|
||||||
; CROSSPOINT_VERSION is set by scripts/git_branch.py (includes branch + short SHA)
|
; CROSSPOINT_VERSION is set by scripts/git_branch.py (includes branch + short SHA)
|
||||||
-DENABLE_SERIAL_LOG
|
-DENABLE_SERIAL_LOG
|
||||||
-DLOG_LEVEL=2 ; Set log level to debug for development builds
|
-DLOG_LEVEL=2 ; Set log level to debug for development builds
|
||||||
|
|
||||||
|
|
||||||
[env:gh_release]
|
[env:gh_release]
|
||||||
extends = c3
|
extends = base
|
||||||
build_flags =
|
build_flags =
|
||||||
${c3.build_flags}
|
${base.build_flags}
|
||||||
-DCROSSPOINT_VERSION=\"${crosspoint.version}\"
|
-DCROSSPOINT_VERSION=\"${crosspoint.version}\"
|
||||||
-DENABLE_SERIAL_LOG
|
-DENABLE_SERIAL_LOG
|
||||||
-DLOG_LEVEL=1 ; Set log level to info for release builds
|
-DLOG_LEVEL=1 ; Set log level to info for release builds
|
||||||
|
|
||||||
[env:gh_release_rc]
|
[env:gh_release_rc]
|
||||||
extends = c3
|
extends = base
|
||||||
build_flags =
|
build_flags =
|
||||||
${c3.build_flags}
|
${base.build_flags}
|
||||||
-DCROSSPOINT_VERSION=\"${crosspoint.version}-rc+${sysenv.CROSSPOINT_RC_HASH}\"
|
-DCROSSPOINT_VERSION=\"${crosspoint.version}-rc+${sysenv.CROSSPOINT_RC_HASH}\"
|
||||||
-DENABLE_SERIAL_LOG
|
-DENABLE_SERIAL_LOG
|
||||||
-DLOG_LEVEL=1 ; Set log level to info for release candidate builds
|
-DLOG_LEVEL=1 ; Set log level to info for release candidate builds
|
||||||
|
|
||||||
[env:slim]
|
[env:slim]
|
||||||
extends = c3
|
extends = base
|
||||||
build_flags =
|
build_flags =
|
||||||
${c3.build_flags}
|
${base.build_flags}
|
||||||
-DCROSSPOINT_VERSION=\"${crosspoint.version}-slim\"
|
-DCROSSPOINT_VERSION=\"${crosspoint.version}-slim\"
|
||||||
; serial output is disabled in slim builds to save space
|
; serial output is disabled in slim builds to save space
|
||||||
-UENABLE_SERIAL_LOG
|
-UENABLE_SERIAL_LOG
|
||||||
|
|
||||||
; --- LilyGo T5 S3 (ESP32-S3 N16R8, 4.7" ED047TC1 / raw-parallel EPD) ---------
|
|
||||||
; Uses FreeInk's LilyGo board-support library for the PCA9535/TPS65185 display
|
|
||||||
; power hooks and expander button.
|
|
||||||
; pio run -e lilygo_t5s3 -t upload --upload-port /dev/tty.usbmodemXXXX
|
|
||||||
[env:lilygo_t5s3]
|
|
||||||
extends = base
|
|
||||||
board = esp32-s3-devkitc1-n16r8
|
|
||||||
board_build.mcu = esp32s3
|
|
||||||
board_build.flash_mode = qio
|
|
||||||
board_build.arduino.memory_type = qio_opi
|
|
||||||
build_flags =
|
|
||||||
${base.build_flags}
|
|
||||||
-DBOARD_HAS_PSRAM
|
|
||||||
-DFREEINK_DEVICE_LILYGO=1
|
|
||||||
-DCROSSPOINT_VERSION=\"${crosspoint.version}-lilygo_t5s3\"
|
|
||||||
-DCROSSPOINT_SHOW_BUTTON_HINTS=0
|
|
||||||
-DENABLE_SERIAL_LOG
|
|
||||||
-DLOG_LEVEL=2
|
|
||||||
-DTOUCH_PROBE_DEBUG=1
|
|
||||||
lib_deps =
|
|
||||||
${base.lib_deps}
|
|
||||||
BoardT5S3=symlink://freeink-sdk/libs/hardware/BoardT5S3
|
|
||||||
m5stack/M5GFX @ 0.2.20
|
|
||||||
|
|
||||||
; --- M5Paper v1.1 (classic ESP32-D0WDQ6, 4.7" 540x960 / IT8951E) -------------
|
|
||||||
; Different MCU family than the C3 base: override board/mcu/flash, disable the
|
|
||||||
; C3-only native-USB CDC (logs over UART0), and select the M5Paper device.
|
|
||||||
; pio run -e m5paper_v11 -t upload --upload-port /dev/tty.usbserial-XXXX
|
|
||||||
[env:m5paper_v11]
|
|
||||||
extends = base
|
|
||||||
board = esp32dev
|
|
||||||
board_build.mcu = esp32
|
|
||||||
board_build.flash_mode = qio
|
|
||||||
; CP2104 bridge: 460800 is ~4x the 115200 fallback and reliable; drop if a flash
|
|
||||||
; stalls. (921600 usually works too.)
|
|
||||||
upload_speed = 460800
|
|
||||||
build_flags =
|
|
||||||
${base.build_flags}
|
|
||||||
-UARDUINO_USB_MODE
|
|
||||||
-UARDUINO_USB_CDC_ON_BOOT
|
|
||||||
-DBOARD_HAS_PSRAM
|
|
||||||
-DFREEINK_DEVICE_M5PAPER=1
|
|
||||||
; git_branch.py only injects CROSSPOINT_VERSION for the default env; set it here.
|
|
||||||
-DCROSSPOINT_VERSION=\"${crosspoint.version}-m5paper_v11\"
|
|
||||||
-DENABLE_SERIAL_LOG
|
|
||||||
-DLOG_LEVEL=2
|
|
||||||
; Touch + rotary: no physical button row, so hide on-screen button hints.
|
|
||||||
-DCROSSPOINT_SHOW_BUTTON_HINTS=0
|
|
||||||
; Archive-order workarounds for the classic-ESP32 link (see freeink-sdk
|
|
||||||
; platformio.crosspoint.sample.ini): force Arduino startup + the I2C HAL members.
|
|
||||||
-Wl,.pio/build/m5paper_v11/FrameworkArduino/main.cpp.o
|
|
||||||
-Wl,-u,i2cInit
|
|
||||||
-Wl,-u,i2cSlaveInit
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Regenerate src/components/icons/generated_icons.h from icons.manifest, using the
|
|
||||||
# FreeInk SDK icon generator and its vendored Lucide submodule. generated_icons.h is
|
|
||||||
# a committed build product of these inputs — re-run this after editing the manifest.
|
|
||||||
#
|
|
||||||
# Requires: rsvg-convert (librsvg) + Pillow, and the Lucide submodule fetched
|
|
||||||
# (git submodule update --init in the SDK).
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
||||||
SDK="$ROOT/freeink-sdk"
|
|
||||||
SVGDIR="$SDK/libs/assets/Icons/lucide/icons"
|
|
||||||
|
|
||||||
if [ ! -d "$SVGDIR" ]; then
|
|
||||||
echo "Lucide SVGs not found at $SVGDIR" >&2
|
|
||||||
echo "Fetch the submodule: git -C \"$SDK\" submodule update --init libs/assets/Icons/lucide" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
python3 "$SDK/libs/assets/Icons/tools/gen_icons.py" \
|
|
||||||
--manifest "$ROOT/src/components/icons/icons.manifest" \
|
|
||||||
--svgdir "$SVGDIR" \
|
|
||||||
--sizes 24,32,40,48 \
|
|
||||||
--out "$ROOT/src/components/icons/generated_icons.h"
|
|
||||||
|
|
||||||
echo "Regenerated src/components/icons/generated_icons.h"
|
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <Serialization.h>
|
#include <Serialization.h>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "I18nKeys.h"
|
#include "I18nKeys.h"
|
||||||
@@ -96,6 +97,7 @@ uint8_t CrossPointSettings::sleepTimeoutEnumToMinutes(const uint8_t legacyValue)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CrossPointSettings::saveToFile() const {
|
bool CrossPointSettings::saveToFile() const {
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
Storage.mkdir("/.crosspoint");
|
Storage.mkdir("/.crosspoint");
|
||||||
return JsonSettingsIO::saveSettings(*this, SETTINGS_FILE_JSON);
|
return JsonSettingsIO::saveSettings(*this, SETTINGS_FILE_JSON);
|
||||||
}
|
}
|
||||||
@@ -106,7 +108,11 @@ bool CrossPointSettings::loadFromFile() {
|
|||||||
String json = Storage.readFile(SETTINGS_FILE_JSON);
|
String json = Storage.readFile(SETTINGS_FILE_JSON);
|
||||||
if (!json.isEmpty()) {
|
if (!json.isEmpty()) {
|
||||||
bool resave = false;
|
bool resave = false;
|
||||||
bool result = JsonSettingsIO::loadSettings(*this, json.c_str(), &resave);
|
bool result;
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
|
result = JsonSettingsIO::loadSettings(*this, json.c_str(), &resave);
|
||||||
|
}
|
||||||
if (result && resave) {
|
if (result && resave) {
|
||||||
if (saveToFile()) {
|
if (saveToFile()) {
|
||||||
LOG_DBG("CPS", "Resaved settings to update format");
|
LOG_DBG("CPS", "Resaved settings to update format");
|
||||||
@@ -166,6 +172,7 @@ bool CrossPointSettings::loadFromBinaryFile() {
|
|||||||
if (!Storage.openFileForRead("CPS", SETTINGS_FILE_BIN, inputFile)) {
|
if (!Storage.openFileForRead("CPS", SETTINGS_FILE_BIN, inputFile)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
|
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
serialization::readPod(inputFile, version);
|
serialization::readPod(inputFile, version);
|
||||||
|
|||||||
@@ -3,9 +3,12 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
class CrossPointSettings {
|
class CrossPointSettings {
|
||||||
private:
|
private:
|
||||||
|
mutable std::mutex _mutex;
|
||||||
|
|
||||||
// Private constructor for singleton
|
// Private constructor for singleton
|
||||||
CrossPointSettings() = default;
|
CrossPointSettings() = default;
|
||||||
|
|
||||||
@@ -17,6 +20,10 @@ class CrossPointSettings {
|
|||||||
CrossPointSettings(const CrossPointSettings&) = delete;
|
CrossPointSettings(const CrossPointSettings&) = delete;
|
||||||
CrossPointSettings& operator=(const CrossPointSettings&) = delete;
|
CrossPointSettings& operator=(const CrossPointSettings&) = delete;
|
||||||
|
|
||||||
|
// Access the settings mutex for protecting multi-field reads/writes from other cores.
|
||||||
|
// Callers must not re-enter SETTINGS methods that lock _mutex while holding it.
|
||||||
|
std::mutex& getMutex() const { return _mutex; }
|
||||||
|
|
||||||
enum SLEEP_SCREEN_MODE {
|
enum SLEEP_SCREEN_MODE {
|
||||||
DARK = 0,
|
DARK = 0,
|
||||||
LIGHT = 1,
|
LIGHT = 1,
|
||||||
@@ -65,6 +72,8 @@ class CrossPointSettings {
|
|||||||
XTC_STATUS_BAR_MODE_COUNT
|
XTC_STATUS_BAR_MODE_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum STATUS_BAR_CLOCK_MODE { STATUS_BAR_CLOCK_HIDE = 0, STATUS_BAR_CLOCK_RIGHT = 1, STATUS_BAR_CLOCK_LEFT = 2 };
|
||||||
|
|
||||||
enum ORIENTATION {
|
enum ORIENTATION {
|
||||||
PORTRAIT = 0, // 480x800 logical coordinates (current default)
|
PORTRAIT = 0, // 480x800 logical coordinates (current default)
|
||||||
LANDSCAPE_CW = 1, // 800x480 logical coordinates, rotated 180° (swap top/bottom)
|
LANDSCAPE_CW = 1, // 800x480 logical coordinates, rotated 180° (swap top/bottom)
|
||||||
@@ -164,6 +173,13 @@ class CrossPointSettings {
|
|||||||
// Image rendering in EPUB reader
|
// Image rendering in EPUB reader
|
||||||
enum IMAGE_RENDERING { IMAGES_DISPLAY = 0, IMAGES_PLACEHOLDER = 1, IMAGES_SUPPRESS = 2, IMAGE_RENDERING_COUNT };
|
enum IMAGE_RENDERING { IMAGES_DISPLAY = 0, IMAGES_PLACEHOLDER = 1, IMAGES_SUPPRESS = 2, IMAGE_RENDERING_COUNT };
|
||||||
|
|
||||||
|
// Text anti-aliasing mode for 2-bit fonts. FULL runs the grayscale LUT
|
||||||
|
// passes after the BW page render (extra refresh per page turn). FAST
|
||||||
|
// approximates AA inside the single BW pass by dithering partial-coverage
|
||||||
|
// glyph pixels (GfxRenderer fast anti-aliasing flag). Value 1 must stay
|
||||||
|
// FULL: it was the "on" value of the old on/off toggle in saved settings.
|
||||||
|
enum TEXT_ANTIALIASING { TEXT_AA_OFF = 0, TEXT_AA_FULL = 1, TEXT_AA_FAST = 2, TEXT_ANTIALIASING_COUNT };
|
||||||
|
|
||||||
enum TILT_PAGE_TURN { TILT_OFF = 0, TILT_NORMAL = 1, TILT_NVERTED = 2, TILT_PAGE_TURN_COUNT };
|
enum TILT_PAGE_TURN { TILT_OFF = 0, TILT_NORMAL = 1, TILT_NVERTED = 2, TILT_PAGE_TURN_COUNT };
|
||||||
|
|
||||||
enum QUICK_RESUME_SLEEP_SCREEN {
|
enum QUICK_RESUME_SLEEP_SCREEN {
|
||||||
@@ -188,7 +204,7 @@ class CrossPointSettings {
|
|||||||
uint8_t statusBarBattery = 1;
|
uint8_t statusBarBattery = 1;
|
||||||
uint8_t xtcStatusBarMode = XTC_STATUS_BAR_HIDE;
|
uint8_t xtcStatusBarMode = XTC_STATUS_BAR_HIDE;
|
||||||
// Clock display in status bar (X3 only, requires DS3231 RTC)
|
// Clock display in status bar (X3 only, requires DS3231 RTC)
|
||||||
uint8_t statusBarClock = 0;
|
uint8_t statusBarClock = STATUS_BAR_CLOCK_HIDE;
|
||||||
// Clock UTC offset in quarter-hour steps, biased by 48 so it fits in uint8_t.
|
// Clock UTC offset in quarter-hour steps, biased by 48 so it fits in uint8_t.
|
||||||
// Value 48 = UTC+0, 0 = UTC-12:00, 104 = UTC+14:00.
|
// Value 48 = UTC+0, 0 = UTC-12:00, 104 = UTC+14:00.
|
||||||
// Quarter-hour granularity supports oddball zones like Nepal (+5:45) and Chatham (+12:45).
|
// Quarter-hour granularity supports oddball zones like Nepal (+5:45) and Chatham (+12:45).
|
||||||
@@ -200,7 +216,7 @@ class CrossPointSettings {
|
|||||||
uint8_t clockHasBeenSynced = 0;
|
uint8_t clockHasBeenSynced = 0;
|
||||||
// Text rendering settings
|
// Text rendering settings
|
||||||
uint8_t extraParagraphSpacing = 1;
|
uint8_t extraParagraphSpacing = 1;
|
||||||
uint8_t textAntiAliasing = 1;
|
uint8_t textAntiAliasing = TEXT_AA_FULL;
|
||||||
// Short power button click behaviour
|
// Short power button click behaviour
|
||||||
uint8_t shortPwrBtn = IGNORE;
|
uint8_t shortPwrBtn = IGNORE;
|
||||||
// EPUB reading orientation settings
|
// EPUB reading orientation settings
|
||||||
@@ -238,15 +254,12 @@ class CrossPointSettings {
|
|||||||
// Long-press page turn button behavior
|
// Long-press page turn button behavior
|
||||||
uint8_t longPressButtonBehavior = OFF;
|
uint8_t longPressButtonBehavior = OFF;
|
||||||
// Long-press Confirm function in EPUB reader (cycles through LONG_PRESS_MENU_FUNCTION values).
|
// Long-press Confirm function in EPUB reader (cycles through LONG_PRESS_MENU_FUNCTION values).
|
||||||
// Defaults to Bookmark to preserve the upstream long-press-Confirm-adds-bookmark behavior.
|
// Defaults to Disabled so shortcut-based bookmark toggling remains opt-in.
|
||||||
uint8_t longPressMenuFunction = LP_MENU_BOOKMARK;
|
uint8_t longPressMenuFunction = LP_MENU_DISABLED;
|
||||||
// UI Theme
|
// UI Theme
|
||||||
uint8_t uiTheme = LYRA;
|
uint8_t uiTheme = LYRA;
|
||||||
// Sunlight fading compensation
|
// Sunlight fading compensation
|
||||||
uint8_t fadingFix = 0;
|
uint8_t fadingFix = 0;
|
||||||
// Touch reader controls: tap zones for page back/forward + press-and-hold,
|
|
||||||
// mirroring the physical buttons. Touch devices only (hidden elsewhere).
|
|
||||||
uint8_t touchReaderControls = 1;
|
|
||||||
// Power button return from footnotes (1 = enabled, 0 = disabled)
|
// Power button return from footnotes (1 = enabled, 0 = disabled)
|
||||||
uint8_t pwrBtnFootnoteBack = 1;
|
uint8_t pwrBtnFootnoteBack = 1;
|
||||||
// Use book's embedded CSS styles for EPUB rendering (1 = enabled, 0 = disabled)
|
// Use book's embedded CSS styles for EPUB rendering (1 = enabled, 0 = disabled)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <Serialization.h>
|
#include <Serialization.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <mutex>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
constexpr uint8_t STATE_FILE_VERSION = 4;
|
constexpr uint8_t STATE_FILE_VERSION = 4;
|
||||||
@@ -32,6 +33,7 @@ void CrossPointState::pushRecentSleep(uint16_t idx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool CrossPointState::saveToFile() const {
|
bool CrossPointState::saveToFile() const {
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
Storage.mkdir("/.crosspoint");
|
Storage.mkdir("/.crosspoint");
|
||||||
return JsonSettingsIO::saveState(*this, STATE_FILE_JSON);
|
return JsonSettingsIO::saveState(*this, STATE_FILE_JSON);
|
||||||
}
|
}
|
||||||
@@ -41,6 +43,7 @@ bool CrossPointState::loadFromFile() {
|
|||||||
if (Storage.exists(STATE_FILE_JSON)) {
|
if (Storage.exists(STATE_FILE_JSON)) {
|
||||||
String json = Storage.readFile(STATE_FILE_JSON);
|
String json = Storage.readFile(STATE_FILE_JSON);
|
||||||
if (!json.isEmpty()) {
|
if (!json.isEmpty()) {
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
return JsonSettingsIO::loadState(*this, json.c_str());
|
return JsonSettingsIO::loadState(*this, json.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,6 +70,7 @@ bool CrossPointState::loadFromBinaryFile() {
|
|||||||
if (!Storage.openFileForRead("CPS", STATE_FILE_BIN, inputFile)) {
|
if (!Storage.openFileForRead("CPS", STATE_FILE_BIN, inputFile)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
|
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
serialization::readPod(inputFile, version);
|
serialization::readPod(inputFile, version);
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class CrossPointState {
|
class CrossPointState {
|
||||||
|
mutable std::mutex _mutex;
|
||||||
|
|
||||||
// Static instance
|
// Static instance
|
||||||
static CrossPointState instance;
|
static CrossPointState instance;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
// Access the state mutex for protecting multi-field reads/writes from other cores.
|
||||||
|
std::mutex& getMutex() const { return _mutex; }
|
||||||
|
|
||||||
static constexpr uint8_t SLEEP_RECENT_COUNT = 16;
|
static constexpr uint8_t SLEEP_RECENT_COUNT = 16;
|
||||||
|
|
||||||
std::string openEpubPath;
|
std::string openEpubPath;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <Logging.h>
|
#include <Logging.h>
|
||||||
#include <ObfuscationUtils.h>
|
#include <ObfuscationUtils.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@@ -153,10 +154,6 @@ bool JsonSettingsIO::saveSettings(const CrossPointSettings& s, const char* path)
|
|||||||
// Stored as ISO code string ("EN", "DE", ...) for stability across enum reorders.
|
// Stored as ISO code string ("EN", "DE", ...) for stability across enum reorders.
|
||||||
doc["language"] = (s.language < getLanguageCount()) ? LANGUAGE_CODES[s.language] : "EN";
|
doc["language"] = (s.language < getLanguageCount()) ? LANGUAGE_CODES[s.language] : "EN";
|
||||||
|
|
||||||
// Language -- managed by LanguageSelectActivity, not in SettingsList.
|
|
||||||
// Stored as ISO code string ("EN", "DE", ...) for stability across enum reorders.
|
|
||||||
doc["language"] = (s.language < getLanguageCount()) ? LANGUAGE_CODES[s.language] : "EN";
|
|
||||||
|
|
||||||
String json;
|
String json;
|
||||||
serializeJson(doc, json);
|
serializeJson(doc, json);
|
||||||
return Storage.writeFile(path, json);
|
return Storage.writeFile(path, json);
|
||||||
@@ -345,6 +342,7 @@ bool JsonSettingsIO::loadRecentBooks(RecentBooksStore& store, const char* json)
|
|||||||
|
|
||||||
store.recentBooks.clear();
|
store.recentBooks.clear();
|
||||||
JsonArray arr = doc["books"].as<JsonArray>();
|
JsonArray arr = doc["books"].as<JsonArray>();
|
||||||
|
store.recentBooks.reserve(std::min(arr.size(), (size_t)10));
|
||||||
for (JsonObject obj : arr) {
|
for (JsonObject obj : arr) {
|
||||||
if (store.getCount() >= 10) break;
|
if (store.getCount() >= 10) break;
|
||||||
RecentBook book;
|
RecentBook book;
|
||||||
@@ -423,6 +421,9 @@ bool JsonSettingsIO::saveBookmarks(const std::vector<BookmarkEntry>& bookmarks,
|
|||||||
obj["xpath"] = bookmark.xpath;
|
obj["xpath"] = bookmark.xpath;
|
||||||
obj["percentage"] = bookmark.percentage;
|
obj["percentage"] = bookmark.percentage;
|
||||||
obj["summary"] = bookmark.summary;
|
obj["summary"] = bookmark.summary;
|
||||||
|
obj["si"] = bookmark.computedSpineIndex;
|
||||||
|
obj["pc"] = bookmark.computedChapterPageCount;
|
||||||
|
obj["pp"] = bookmark.computedChapterProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
String json;
|
String json;
|
||||||
@@ -447,6 +448,9 @@ bool JsonSettingsIO::loadBookmarks(std::vector<BookmarkEntry>& bookmarks, const
|
|||||||
bookmark.xpath = obj["xpath"] | std::string("");
|
bookmark.xpath = obj["xpath"] | std::string("");
|
||||||
bookmark.percentage = obj["percentage"] | static_cast<float>(0);
|
bookmark.percentage = obj["percentage"] | static_cast<float>(0);
|
||||||
bookmark.summary = obj["summary"] | std::string("");
|
bookmark.summary = obj["summary"] | std::string("");
|
||||||
|
bookmark.computedSpineIndex = obj["si"] | static_cast<uint16_t>(0);
|
||||||
|
bookmark.computedChapterPageCount = obj["pc"] | static_cast<uint16_t>(0);
|
||||||
|
bookmark.computedChapterProgress = obj["pp"] | static_cast<uint16_t>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DBG("BKM", "Loaded %zu bookmarks from file", bookmarks.size());
|
LOG_DBG("BKM", "Loaded %zu bookmarks from file", bookmarks.size());
|
||||||
|
|||||||
+3
-187
@@ -1,12 +1,8 @@
|
|||||||
#include "MappedInputManager.h"
|
#include "MappedInputManager.h"
|
||||||
|
|
||||||
#include <FreeInkUI.h>
|
|
||||||
#include <GfxRenderer.h>
|
#include <GfxRenderer.h>
|
||||||
|
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
#include "CrossPointSettings.h"
|
#include "CrossPointSettings.h"
|
||||||
#include "components/TouchRegistry.h"
|
|
||||||
|
|
||||||
bool MappedInputManager::isNavDirectionSwapped() const {
|
bool MappedInputManager::isNavDirectionSwapped() const {
|
||||||
// Key the swap on the orientation the screen is *actually* rendered at, not the persisted reader
|
// Key the swap on the orientation the screen is *actually* rendered at, not the persisted reader
|
||||||
@@ -78,182 +74,9 @@ bool MappedInputManager::mapButton(const Button button, bool (HalGPIO::*fn)(uint
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Top-left corner fallback, as a fraction of the logical screen. Generous to hit.
|
bool MappedInputManager::wasPressed(const Button button) const { return mapButton(button, &HalGPIO::wasPressed); }
|
||||||
static constexpr float BACK_GESTURE_FRAC_X = 0.22f;
|
|
||||||
static constexpr float BACK_GESTURE_FRAC_Y = 0.12f;
|
|
||||||
static constexpr float BOTTOM_EDGE_BACK_GESTURE_FRAC_Y = 0.14f;
|
|
||||||
static constexpr unsigned long TOUCH_DOWN_SELECT_DELAY_MS = 90;
|
|
||||||
static constexpr unsigned long TOUCH_HELD_OVERRIDE_WINDOW_MS = 250;
|
|
||||||
|
|
||||||
void MappedInputManager::rememberTouchHeldTime() const {
|
bool MappedInputManager::wasReleased(const Button button) const { return mapButton(button, &HalGPIO::wasReleased); }
|
||||||
touchHeldOverrideValid = true;
|
|
||||||
touchHeldOverrideMs = gpio.lastTouchHeldMs();
|
|
||||||
touchHeldOverrideAt = millis();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasBottomEdgeSwipeUp() const {
|
|
||||||
float nxs = 0.0f, nys = 0.0f, nxe = 0.0f, nye = 0.0f;
|
|
||||||
if (!gpio.wasSwipe(nxs, nys, nxe, nye)) return false;
|
|
||||||
|
|
||||||
int sx = 0, sy = 0, ex = 0, ey = 0;
|
|
||||||
renderer.tapToLogical(nxs, nys, sx, sy);
|
|
||||||
renderer.tapToLogical(nxe, nye, ex, ey);
|
|
||||||
|
|
||||||
const int screenHeight = renderer.getScreenHeight();
|
|
||||||
const int bottomEdgeTop = screenHeight - static_cast<int>(screenHeight * BOTTOM_EDGE_BACK_GESTURE_FRAC_Y);
|
|
||||||
const bool isBackSwipe = sy >= bottomEdgeTop && ey < sy && std::abs(ey - sy) > std::abs(ex - sx);
|
|
||||||
if (isBackSwipe) rememberTouchHeldTime();
|
|
||||||
return isBackSwipe;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasBackGesture() const {
|
|
||||||
if (wasBottomEdgeSwipeUp()) return true;
|
|
||||||
|
|
||||||
float nx = 0.0f, ny = 0.0f;
|
|
||||||
if (!gpio.wasTouchTap(nx, ny)) return false;
|
|
||||||
int lx = 0, ly = 0;
|
|
||||||
renderer.tapToLogical(nx, ny, lx, ly);
|
|
||||||
// A tap on the theme's header Back target acts as Back.
|
|
||||||
int id = 0;
|
|
||||||
if (TouchRegistry::getInstance().hitTest(lx, ly, TouchRegistry::Back, id)) {
|
|
||||||
rememberTouchHeldTime();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// Else the top-left corner, for screens with no Back target (e.g. the reader).
|
|
||||||
const bool isTopLeftBack =
|
|
||||||
lx <= renderer.getScreenWidth() * BACK_GESTURE_FRAC_X && ly <= renderer.getScreenHeight() * BACK_GESTURE_FRAC_Y;
|
|
||||||
if (isTopLeftBack) rememberTouchHeldTime();
|
|
||||||
return isTopLeftBack;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasItemTapped(int& id) const {
|
|
||||||
float nx = 0.0f, ny = 0.0f;
|
|
||||||
if (!gpio.wasTouchTap(nx, ny)) return false;
|
|
||||||
int lx = 0, ly = 0;
|
|
||||||
renderer.tapToLogical(nx, ny, lx, ly);
|
|
||||||
const bool hit = TouchRegistry::getInstance().hitTest(lx, ly, TouchRegistry::Item, id);
|
|
||||||
if (hit) rememberTouchHeldTime();
|
|
||||||
return hit;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasItemTouchedDown(int& id) const {
|
|
||||||
float nx = 0.0f, ny = 0.0f;
|
|
||||||
unsigned long heldMs = 0;
|
|
||||||
if (!gpio.isTouchTapCandidate(nx, ny, heldMs)) {
|
|
||||||
touchSelectTracking = false;
|
|
||||||
touchSelectEmitted = false;
|
|
||||||
touchSelectId = -1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!touchSelectTracking) {
|
|
||||||
float downNx = 0.0f, downNy = 0.0f;
|
|
||||||
if (!gpio.wasTouchDown(downNx, downNy)) return false;
|
|
||||||
|
|
||||||
int lx = 0, ly = 0;
|
|
||||||
renderer.tapToLogical(downNx, downNy, lx, ly);
|
|
||||||
int candidateId = -1;
|
|
||||||
if (!TouchRegistry::getInstance().hitTest(lx, ly, TouchRegistry::Item, candidateId)) {
|
|
||||||
touchSelectTracking = false;
|
|
||||||
touchSelectEmitted = false;
|
|
||||||
touchSelectId = -1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
touchSelectTracking = true;
|
|
||||||
touchSelectEmitted = false;
|
|
||||||
touchSelectId = candidateId;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (touchSelectEmitted || heldMs < TOUCH_DOWN_SELECT_DELAY_MS) return false;
|
|
||||||
touchSelectEmitted = true;
|
|
||||||
id = touchSelectId;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasItemLongPressed(int& id) const {
|
|
||||||
static constexpr unsigned long TOUCH_LONG_PRESS_MS = 500;
|
|
||||||
float nx = 0.0f, ny = 0.0f;
|
|
||||||
if (!gpio.wasTouchTap(nx, ny)) return false; // release frame
|
|
||||||
if (gpio.lastTouchHeldMs() < TOUCH_LONG_PRESS_MS) return false;
|
|
||||||
int lx = 0, ly = 0;
|
|
||||||
renderer.tapToLogical(nx, ny, lx, ly);
|
|
||||||
const bool hit = TouchRegistry::getInstance().hitTest(lx, ly, TouchRegistry::Item, id);
|
|
||||||
if (hit) rememberTouchHeldTime();
|
|
||||||
return hit;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasTabTapped(int& id) const {
|
|
||||||
float nx = 0.0f, ny = 0.0f;
|
|
||||||
if (!gpio.wasTouchTap(nx, ny)) return false;
|
|
||||||
int lx = 0, ly = 0;
|
|
||||||
renderer.tapToLogical(nx, ny, lx, ly);
|
|
||||||
const bool hit = TouchRegistry::getInstance().hitTest(lx, ly, TouchRegistry::Tab, id);
|
|
||||||
if (hit) rememberTouchHeldTime();
|
|
||||||
return hit;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasCoverTapped(int& id) const {
|
|
||||||
float nx = 0.0f, ny = 0.0f;
|
|
||||||
if (!gpio.wasTouchTap(nx, ny)) return false;
|
|
||||||
int lx = 0, ly = 0;
|
|
||||||
renderer.tapToLogical(nx, ny, lx, ly);
|
|
||||||
const bool hit = TouchRegistry::getInstance().hitTest(lx, ly, TouchRegistry::Cover, id);
|
|
||||||
if (hit) rememberTouchHeldTime();
|
|
||||||
return hit;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasScreenTapped(int& x, int& y) const {
|
|
||||||
float nx = 0.0f, ny = 0.0f;
|
|
||||||
if (!gpio.wasTouchTap(nx, ny)) return false;
|
|
||||||
renderer.tapToLogical(nx, ny, x, y);
|
|
||||||
rememberTouchHeldTime();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasListScroll(int& index, int count, int pageItems) const {
|
|
||||||
if (count <= 0) return false;
|
|
||||||
if (pageItems < 1) pageItems = 1;
|
|
||||||
if (wasBottomEdgeSwipeUp()) return false;
|
|
||||||
const SwipeDir swipe = wasSwipe();
|
|
||||||
if (swipe == SwipeDir::Up) {
|
|
||||||
return freeink::ui::listPageIndex(index, +1, count, pageItems);
|
|
||||||
}
|
|
||||||
if (swipe == SwipeDir::Down) {
|
|
||||||
return freeink::ui::listPageIndex(index, -1, count, pageItems);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
MappedInputManager::SwipeDir MappedInputManager::wasSwipe() const {
|
|
||||||
if (wasBottomEdgeSwipeUp()) return SwipeDir::None;
|
|
||||||
|
|
||||||
float nxs = 0.0f, nys = 0.0f, nxe = 0.0f, nye = 0.0f;
|
|
||||||
if (!gpio.wasSwipe(nxs, nys, nxe, nye)) return SwipeDir::None;
|
|
||||||
// Map both endpoints into the logical frame so the direction follows what the
|
|
||||||
// user sees regardless of panel mount/orientation.
|
|
||||||
int sx = 0, sy = 0, ex = 0, ey = 0;
|
|
||||||
renderer.tapToLogical(nxs, nys, sx, sy);
|
|
||||||
renderer.tapToLogical(nxe, nye, ex, ey);
|
|
||||||
const int dx = ex - sx;
|
|
||||||
const int dy = ey - sy;
|
|
||||||
if (std::abs(dx) >= std::abs(dy)) {
|
|
||||||
return dx < 0 ? SwipeDir::Left : SwipeDir::Right;
|
|
||||||
}
|
|
||||||
return dy < 0 ? SwipeDir::Up : SwipeDir::Down;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasPressed(const Button button) const {
|
|
||||||
// A top-left tap fires on the release frame; expose it on Back's press edge too
|
|
||||||
// so menus that act on wasPressed(Back) also respond. Deliberately NOT folded
|
|
||||||
// into isPressed, so a quick tap never satisfies the readers' long-press-home.
|
|
||||||
if (button == Button::Back && wasBackGesture()) return true;
|
|
||||||
return mapButton(button, &HalGPIO::wasPressed);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::wasReleased(const Button button) const {
|
|
||||||
if (button == Button::Back && wasBackGesture()) return true;
|
|
||||||
return mapButton(button, &HalGPIO::wasReleased);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MappedInputManager::isPressed(const Button button) const { return mapButton(button, &HalGPIO::isPressed); }
|
bool MappedInputManager::isPressed(const Button button) const { return mapButton(button, &HalGPIO::isPressed); }
|
||||||
|
|
||||||
@@ -261,14 +84,7 @@ bool MappedInputManager::wasAnyPressed() const { return gpio.wasAnyPressed(); }
|
|||||||
|
|
||||||
bool MappedInputManager::wasAnyReleased() const { return gpio.wasAnyReleased(); }
|
bool MappedInputManager::wasAnyReleased() const { return gpio.wasAnyReleased(); }
|
||||||
|
|
||||||
unsigned long MappedInputManager::getHeldTime() const {
|
unsigned long MappedInputManager::getHeldTime() const { return gpio.getHeldTime(); }
|
||||||
if (!gpio.wasAnyPressed() && !gpio.wasAnyReleased() && touchHeldOverrideValid &&
|
|
||||||
millis() - touchHeldOverrideAt <= TOUCH_HELD_OVERRIDE_WINDOW_MS) {
|
|
||||||
return touchHeldOverrideMs;
|
|
||||||
}
|
|
||||||
touchHeldOverrideValid = false;
|
|
||||||
return gpio.getHeldTime();
|
|
||||||
}
|
|
||||||
|
|
||||||
MappedInputManager::Labels MappedInputManager::mapLabels(const char* back, const char* confirm, const char* previous,
|
MappedInputManager::Labels MappedInputManager::mapLabels(const char* back, const char* confirm, const char* previous,
|
||||||
const char* next) const {
|
const char* next) const {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ class GfxRenderer;
|
|||||||
class MappedInputManager {
|
class MappedInputManager {
|
||||||
public:
|
public:
|
||||||
enum class Button { Back, Confirm, Left, Right, Up, Down, Power, PageBack, PageForward, NavNext, NavPrevious };
|
enum class Button { Back, Confirm, Left, Right, Up, Down, Power, PageBack, PageForward, NavNext, NavPrevious };
|
||||||
enum class SwipeDir { None, Left, Right, Up, Down };
|
|
||||||
|
|
||||||
struct Labels {
|
struct Labels {
|
||||||
const char* btn1;
|
const char* btn1;
|
||||||
@@ -22,33 +21,6 @@ class MappedInputManager {
|
|||||||
bool wasPressed(Button button) const;
|
bool wasPressed(Button button) const;
|
||||||
bool wasReleased(Button button) const;
|
bool wasReleased(Button button) const;
|
||||||
bool isPressed(Button button) const;
|
bool isPressed(Button button) const;
|
||||||
// Touch "back" gesture: a tap on the theme's header Back target, or in the
|
|
||||||
// top-left corner, or a swipe up from the visible bottom edge. Folded into
|
|
||||||
// Back's edges, so every screen gets it for free.
|
|
||||||
bool wasBackGesture() const;
|
|
||||||
// True (and writes the id) if a tap this frame hit a TouchRegistry item.
|
|
||||||
// Activities treat the id as "select + activate". False on non-touch devices.
|
|
||||||
bool wasItemTapped(int& id) const;
|
|
||||||
// Stable touch-down candidate: fires once when a touch remains over an item
|
|
||||||
// briefly without crossing tap slop, so swipes do not show row selection.
|
|
||||||
bool wasItemTouchedDown(int& id) const;
|
|
||||||
// Subset of wasItemTapped's releases held past the long-press threshold (check
|
|
||||||
// this first). Distinguishes tap vs press-and-hold.
|
|
||||||
bool wasItemLongPressed(int& id) const;
|
|
||||||
// wasItemTapped for tab-bar tabs (id = tab index) and cover/card targets
|
|
||||||
// (id = item index). Distinct kinds so a screen with both doesn't confuse them.
|
|
||||||
bool wasTabTapped(int& id) const;
|
|
||||||
bool wasCoverTapped(int& id) const;
|
|
||||||
// True on a touch release anywhere on screen, with logical/oriented coords.
|
|
||||||
bool wasScreenTapped(int& x, int& y) const;
|
|
||||||
// Swipe direction in the current logical (oriented) frame, or None. A swipe also
|
|
||||||
// raises the tap helpers above, so check this first and consume it.
|
|
||||||
SwipeDir wasSwipe() const;
|
|
||||||
// Page-scroll a list selection by a vertical swipe (touch nav without buttons):
|
|
||||||
// swipe up advances down the list, swipe down moves up, by pageItems, clamped to
|
|
||||||
// [0, count-1]. Updates index and returns true when a vertical swipe occurred, so
|
|
||||||
// callers can requestUpdate() and return before the tap handlers run.
|
|
||||||
bool wasListScroll(int& index, int count, int pageItems) const;
|
|
||||||
bool wasAnyPressed() const;
|
bool wasAnyPressed() const;
|
||||||
bool wasAnyReleased() const;
|
bool wasAnyReleased() const;
|
||||||
unsigned long getHeldTime() const;
|
unsigned long getHeldTime() const;
|
||||||
@@ -72,13 +44,4 @@ class MappedInputManager {
|
|||||||
const GfxRenderer& renderer;
|
const GfxRenderer& renderer;
|
||||||
|
|
||||||
bool mapButton(Button button, bool (HalGPIO::*fn)(uint8_t) const) const;
|
bool mapButton(Button button, bool (HalGPIO::*fn)(uint8_t) const) const;
|
||||||
void rememberTouchHeldTime() const;
|
|
||||||
bool wasBottomEdgeSwipeUp() const;
|
|
||||||
|
|
||||||
mutable bool touchSelectTracking = false;
|
|
||||||
mutable bool touchSelectEmitted = false;
|
|
||||||
mutable int touchSelectId = -1;
|
|
||||||
mutable bool touchHeldOverrideValid = false;
|
|
||||||
mutable unsigned long touchHeldOverrideMs = 0;
|
|
||||||
mutable unsigned long touchHeldOverrideAt = 0;
|
|
||||||
};
|
};
|
||||||
@@ -34,10 +34,12 @@ void SdCardFontSystem::begin(GfxRenderer& renderer) {
|
|||||||
} else {
|
} else {
|
||||||
LOG_ERR("SDFS", "Failed to load SD font family: %s (clearing)", SETTINGS.sdFontFamilyName);
|
LOG_ERR("SDFS", "Failed to load SD font family: %s (clearing)", SETTINGS.sdFontFamilyName);
|
||||||
SETTINGS.sdFontFamilyName[0] = '\0';
|
SETTINGS.sdFontFamilyName[0] = '\0';
|
||||||
|
SETTINGS.saveToFile();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_DBG("SDFS", "SD font family not found on card: %s (clearing)", SETTINGS.sdFontFamilyName);
|
LOG_DBG("SDFS", "SD font family not found on card: %s (clearing)", SETTINGS.sdFontFamilyName);
|
||||||
SETTINGS.sdFontFamilyName[0] = '\0';
|
SETTINGS.sdFontFamilyName[0] = '\0';
|
||||||
|
SETTINGS.saveToFile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +78,7 @@ void SdCardFontSystem::ensureLoaded(GfxRenderer& renderer) {
|
|||||||
LOG_DBG("SDFS", "SD font family disappeared: %s (clearing)", wantedFamily);
|
LOG_DBG("SDFS", "SD font family disappeared: %s (clearing)", wantedFamily);
|
||||||
manager_.unloadAll(renderer);
|
manager_.unloadAll(renderer);
|
||||||
SETTINGS.sdFontFamilyName[0] = '\0';
|
SETTINGS.sdFontFamilyName[0] = '\0';
|
||||||
|
SETTINGS.saveToFile();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto* selected = family->findClosestReaderSize(sizeEnum);
|
const auto* selected = family->findClosestReaderSize(sizeEnum);
|
||||||
@@ -96,10 +99,12 @@ void SdCardFontSystem::ensureLoaded(GfxRenderer& renderer) {
|
|||||||
} else {
|
} else {
|
||||||
LOG_ERR("SDFS", "Failed to load SD font family: %s (clearing)", wantedFamily);
|
LOG_ERR("SDFS", "Failed to load SD font family: %s (clearing)", wantedFamily);
|
||||||
SETTINGS.sdFontFamilyName[0] = '\0';
|
SETTINGS.sdFontFamilyName[0] = '\0';
|
||||||
|
SETTINGS.saveToFile();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_DBG("SDFS", "SD font family not found: %s (clearing)", wantedFamily);
|
LOG_DBG("SDFS", "SD font family not found: %s (clearing)", wantedFamily);
|
||||||
SETTINGS.sdFontFamilyName[0] = '\0';
|
SETTINGS.sdFontFamilyName[0] = '\0';
|
||||||
|
SETTINGS.saveToFile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-31
@@ -1,8 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <BoardConfig.h>
|
|
||||||
#include <HalClock.h>
|
#include <HalClock.h>
|
||||||
#include <HalGPIO.h>
|
|
||||||
#include <HalTiltSensor.h>
|
#include <HalTiltSensor.h>
|
||||||
#include <I18n.h>
|
#include <I18n.h>
|
||||||
#include <SdCardFontRegistry.h>
|
#include <SdCardFontRegistry.h>
|
||||||
@@ -106,8 +104,8 @@ inline std::vector<SettingInfo> getSettingsList(const SdCardFontRegistry* regist
|
|||||||
std::vector<SettingInfo> v = {
|
std::vector<SettingInfo> v = {
|
||||||
// --- Display ---
|
// --- Display ---
|
||||||
SettingInfo::Enum(StrId::STR_SLEEP_SCREEN, &CrossPointSettings::sleepScreen,
|
SettingInfo::Enum(StrId::STR_SLEEP_SCREEN, &CrossPointSettings::sleepScreen,
|
||||||
{StrId::STR_DARK, StrId::STR_LIGHT, StrId::STR_CUSTOM, StrId::STR_COVER, StrId::STR_NONE_OPT,
|
{StrId::STR_DARK, StrId::STR_LIGHT, StrId::STR_CUSTOM, StrId::STR_COVER,
|
||||||
StrId::STR_COVER_CUSTOM, StrId::STR_QUICK_RESUME},
|
StrId::STR_COVER_CUSTOM, StrId::STR_NONE_OPT, StrId::STR_QUICK_RESUME},
|
||||||
"sleepScreen", StrId::STR_CAT_DISPLAY),
|
"sleepScreen", StrId::STR_CAT_DISPLAY),
|
||||||
SettingInfo::Enum(StrId::STR_SLEEP_COVER_MODE, &CrossPointSettings::sleepScreenCoverMode,
|
SettingInfo::Enum(StrId::STR_SLEEP_COVER_MODE, &CrossPointSettings::sleepScreenCoverMode,
|
||||||
{StrId::STR_FIT, StrId::STR_CROP}, "sleepScreenCoverMode", StrId::STR_CAT_DISPLAY),
|
{StrId::STR_FIT, StrId::STR_CROP}, "sleepScreenCoverMode", StrId::STR_CAT_DISPLAY),
|
||||||
@@ -153,13 +151,17 @@ inline std::vector<SettingInfo> getSettingsList(const SdCardFontRegistry* regist
|
|||||||
StrId::STR_CAT_READER),
|
StrId::STR_CAT_READER),
|
||||||
SettingInfo::Toggle(StrId::STR_HYPHENATION, &CrossPointSettings::hyphenationEnabled, "hyphenationEnabled",
|
SettingInfo::Toggle(StrId::STR_HYPHENATION, &CrossPointSettings::hyphenationEnabled, "hyphenationEnabled",
|
||||||
StrId::STR_CAT_READER),
|
StrId::STR_CAT_READER),
|
||||||
SettingInfo::Enum(StrId::STR_ORIENTATION, &CrossPointSettings::orientation,
|
SettingInfo::Enum(
|
||||||
{StrId::STR_PORTRAIT, StrId::STR_LANDSCAPE_CW, StrId::STR_INVERTED, StrId::STR_LANDSCAPE_CCW},
|
StrId::STR_ORIENTATION, &CrossPointSettings::orientation,
|
||||||
"orientation", StrId::STR_CAT_READER),
|
{StrId::STR_PORTRAIT, StrId::STR_LANDSCAPE_CW, StrId::STR_ORIENTATION_INVERTED, StrId::STR_LANDSCAPE_CCW},
|
||||||
|
"orientation", StrId::STR_CAT_READER),
|
||||||
SettingInfo::Toggle(StrId::STR_EXTRA_SPACING, &CrossPointSettings::extraParagraphSpacing,
|
SettingInfo::Toggle(StrId::STR_EXTRA_SPACING, &CrossPointSettings::extraParagraphSpacing,
|
||||||
"extraParagraphSpacing", StrId::STR_CAT_READER),
|
"extraParagraphSpacing", StrId::STR_CAT_READER),
|
||||||
SettingInfo::Toggle(StrId::STR_TEXT_AA, &CrossPointSettings::textAntiAliasing, "textAntiAliasing",
|
// Option order must match TEXT_ANTIALIASING values (popup index is
|
||||||
StrId::STR_CAT_READER),
|
// stored directly): OFF=0, FULL=1 (legacy toggle "on"), FAST=2.
|
||||||
|
SettingInfo::Enum(StrId::STR_TEXT_AA, &CrossPointSettings::textAntiAliasing,
|
||||||
|
{StrId::STR_STATE_OFF, StrId::STR_TEXT_AA_FULL, StrId::STR_TEXT_AA_FAST}, "textAntiAliasing",
|
||||||
|
StrId::STR_CAT_READER),
|
||||||
SettingInfo::Enum(StrId::STR_IMAGES, &CrossPointSettings::imageRendering,
|
SettingInfo::Enum(StrId::STR_IMAGES, &CrossPointSettings::imageRendering,
|
||||||
{StrId::STR_IMAGES_DISPLAY, StrId::STR_IMAGES_PLACEHOLDER, StrId::STR_IMAGES_SUPPRESS},
|
{StrId::STR_IMAGES_DISPLAY, StrId::STR_IMAGES_PLACEHOLDER, StrId::STR_IMAGES_SUPPRESS},
|
||||||
"imageRendering", StrId::STR_CAT_READER),
|
"imageRendering", StrId::STR_CAT_READER),
|
||||||
@@ -246,8 +248,9 @@ inline std::vector<SettingInfo> getSettingsList(const SdCardFontRegistry* regist
|
|||||||
StrId::STR_CUSTOMISE_STATUS_BAR),
|
StrId::STR_CUSTOMISE_STATUS_BAR),
|
||||||
// Clock entries (web settings only; device UI uses ClockOffsetActivity for the offset).
|
// Clock entries (web settings only; device UI uses ClockOffsetActivity for the offset).
|
||||||
// Range 0..104 = quarter-hour steps from UTC-12:00 to UTC+14:00, biased by 48.
|
// Range 0..104 = quarter-hour steps from UTC-12:00 to UTC+14:00, biased by 48.
|
||||||
SettingInfo::Toggle(StrId::STR_CLOCK, &CrossPointSettings::statusBarClock, "statusBarClock",
|
SettingInfo::Enum(StrId::STR_CLOCK, &CrossPointSettings::statusBarClock,
|
||||||
StrId::STR_CUSTOMISE_STATUS_BAR),
|
{StrId::STR_HIDE, StrId::STR_DIR_LEFT, StrId::STR_DIR_RIGHT}, "statusBarClock",
|
||||||
|
StrId::STR_CUSTOMISE_STATUS_BAR),
|
||||||
SettingInfo::Value(StrId::STR_CLOCK_UTC_OFFSET, &CrossPointSettings::clockUtcOffsetQ, {0, 104, 1},
|
SettingInfo::Value(StrId::STR_CLOCK_UTC_OFFSET, &CrossPointSettings::clockUtcOffsetQ, {0, 104, 1},
|
||||||
"clockUtcOffsetQ", StrId::STR_CUSTOMISE_STATUS_BAR),
|
"clockUtcOffsetQ", StrId::STR_CUSTOMISE_STATUS_BAR),
|
||||||
SettingInfo::Enum(StrId::STR_CLOCK_FORMAT, &CrossPointSettings::clockFormat,
|
SettingInfo::Enum(StrId::STR_CLOCK_FORMAT, &CrossPointSettings::clockFormat,
|
||||||
@@ -258,26 +261,6 @@ inline std::vector<SettingInfo> getSettingsList(const SdCardFontRegistry* regist
|
|||||||
SettingInfo::Toggle(StrId::STR_CLOCK_SYNCED, &CrossPointSettings::clockHasBeenSynced, "clockHasBeenSynced",
|
SettingInfo::Toggle(StrId::STR_CLOCK_SYNCED, &CrossPointSettings::clockHasBeenSynced, "clockHasBeenSynced",
|
||||||
StrId::STR_CUSTOMISE_STATUS_BAR),
|
StrId::STR_CUSTOMISE_STATUS_BAR),
|
||||||
};
|
};
|
||||||
// Sunlight fading fix is Xteink-only (transflective panel); other devices get
|
|
||||||
// the touch reader controls toggle instead. Same gate as the reader runtime.
|
|
||||||
if (!gpio.isXteinkDevice()) {
|
|
||||||
v.erase(std::remove_if(v.begin(), v.end(),
|
|
||||||
[](const SettingInfo& s) { return s.nameId == StrId::STR_SUNLIGHT_FADING_FIX; }),
|
|
||||||
v.end());
|
|
||||||
for (auto it = v.begin(); it != v.end(); ++it) {
|
|
||||||
if (it->nameId == StrId::STR_SIDE_BTN_LAYOUT) {
|
|
||||||
v.insert(it, SettingInfo::Toggle(StrId::STR_TOUCH_READER_CONTROLS, &CrossPointSettings::touchReaderControls,
|
|
||||||
"touchReaderControls", StrId::STR_CAT_CONTROLS));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (BoardConfig::hasTouch()) {
|
|
||||||
v.erase(std::remove_if(v.begin(), v.end(),
|
|
||||||
[](const SettingInfo& s) { return s.nameId == StrId::STR_FRONT_BTN_FOLLOW_ORIENTATION; }),
|
|
||||||
v.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only show tilt page turn setting when the QMI8658 IMU is present (X3)
|
// Only show tilt page turn setting when the QMI8658 IMU is present (X3)
|
||||||
if (halTiltSensor.isAvailable()) {
|
if (halTiltSensor.isAvailable()) {
|
||||||
// Insert after the short power button setting (end of Controls section)
|
// Insert after the short power button setting (end of Controls section)
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
#include <ObfuscationUtils.h>
|
#include <ObfuscationUtils.h>
|
||||||
#include <Serialization.h>
|
#include <Serialization.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
// Initialize the static instance
|
// Initialize the static instance
|
||||||
WifiCredentialStore WifiCredentialStore::instance;
|
WifiCredentialStore WifiCredentialStore::instance;
|
||||||
|
|
||||||
@@ -89,6 +91,7 @@ bool WifiCredentialStore::loadFromBinaryFile() {
|
|||||||
serialization::readPod(file, count);
|
serialization::readPod(file, count);
|
||||||
|
|
||||||
credentials.clear();
|
credentials.clear();
|
||||||
|
credentials.reserve(std::min<size_t>(count, MAX_NETWORKS));
|
||||||
for (uint8_t i = 0; i < count && i < MAX_NETWORKS; i++) {
|
for (uint8_t i = 0; i < count && i < MAX_NETWORKS; i++) {
|
||||||
WifiCredential cred;
|
WifiCredential cred;
|
||||||
serialization::readString(file, cred.ssid);
|
serialization::readString(file, cred.ssid);
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ class Activity {
|
|||||||
// Finish this activity and return to the previous one on the stack (if any)
|
// Finish this activity and return to the previous one on the stack (if any)
|
||||||
void finish();
|
void finish();
|
||||||
|
|
||||||
// Convenience method to facilitate API transition to ActivityManager.
|
// Convenience method to facilitate API transition to ActivityManager
|
||||||
|
// TODO: remove this in near future
|
||||||
void onGoHome(HomeMenuItem item = HomeMenuItem::NONE);
|
void onGoHome(HomeMenuItem item = HomeMenuItem::NONE);
|
||||||
void onSelectBook(const std::string& path);
|
void onSelectBook(const std::string& path);
|
||||||
};
|
};
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
#include "boot_sleep/BootActivity.h"
|
#include "boot_sleep/BootActivity.h"
|
||||||
#include "boot_sleep/SleepActivity.h"
|
#include "boot_sleep/SleepActivity.h"
|
||||||
#include "browser/OpdsBookBrowserActivity.h"
|
#include "browser/OpdsBookBrowserActivity.h"
|
||||||
#include "components/TouchRegistry.h"
|
|
||||||
#include "home/CrashActivity.h"
|
#include "home/CrashActivity.h"
|
||||||
#include "home/FileBrowserActivity.h"
|
#include "home/FileBrowserActivity.h"
|
||||||
#include "home/HomeActivity.h"
|
#include "home/HomeActivity.h"
|
||||||
@@ -20,19 +19,15 @@
|
|||||||
#include "settings/SettingsActivity.h"
|
#include "settings/SettingsActivity.h"
|
||||||
#include "util/FullScreenMessageActivity.h"
|
#include "util/FullScreenMessageActivity.h"
|
||||||
|
|
||||||
// taskENTER_CRITICAL needs a real spinlock on dual-core targets (classic ESP32,
|
static portMUX_TYPE activityManagerSpinlock = portMUX_INITIALIZER_UNLOCKED;
|
||||||
// e.g. M5Paper). On the single-core ESP32-C3 a nullptr mux was tolerated, but
|
|
||||||
// the dual-core port acquires an inter-core spinlock and asserts on a null
|
|
||||||
// pointer (spinlock_acquire, spinlock.h:84). One shared spinlock guards the
|
|
||||||
// short waitingTaskHandle critical sections below.
|
|
||||||
static portMUX_TYPE activityMux = portMUX_INITIALIZER_UNLOCKED;
|
|
||||||
|
|
||||||
void ActivityManager::begin() {
|
void ActivityManager::begin() {
|
||||||
xTaskCreate(&renderTaskTrampoline, "ActivityManagerRender",
|
xTaskCreatePinnedToCore(&renderTaskTrampoline, "ActivityManagerRender",
|
||||||
8192, // Stack size
|
8192, // Stack size
|
||||||
this, // Parameters
|
this, // Parameters
|
||||||
1, // Priority
|
1, // Priority
|
||||||
&renderTaskHandle // Task handle
|
&renderTaskHandle, // Task handle
|
||||||
|
0 // Pin to core 0 (PRO_CPU)
|
||||||
);
|
);
|
||||||
assert(renderTaskHandle != nullptr && "Failed to create render task");
|
assert(renderTaskHandle != nullptr && "Failed to create render task");
|
||||||
}
|
}
|
||||||
@@ -50,18 +45,14 @@ void ActivityManager::renderTaskLoop() {
|
|||||||
RenderLock lock;
|
RenderLock lock;
|
||||||
if (currentActivity) {
|
if (currentActivity) {
|
||||||
HalPowerManager::Lock powerLock; // Ensure we don't go into low-power mode while rendering
|
HalPowerManager::Lock powerLock; // Ensure we don't go into low-power mode while rendering
|
||||||
// Touch targets are rebuilt every frame: clear before the activity draws, then
|
|
||||||
// publish so the next loop() hit-tests against exactly what's on screen.
|
|
||||||
TouchRegistry::getInstance().beginFrame();
|
|
||||||
currentActivity->render(std::move(lock));
|
currentActivity->render(std::move(lock));
|
||||||
TouchRegistry::getInstance().publish();
|
|
||||||
}
|
}
|
||||||
// Notify any task blocked in requestUpdateAndWait() that the render is done.
|
// Notify any task blocked in requestUpdateAndWait() that the render is done.
|
||||||
TaskHandle_t waiter = nullptr;
|
TaskHandle_t waiter = nullptr;
|
||||||
taskENTER_CRITICAL(&activityMux);
|
taskENTER_CRITICAL(&activityManagerSpinlock);
|
||||||
waiter = waitingTaskHandle;
|
waiter = waitingTaskHandle;
|
||||||
waitingTaskHandle = nullptr;
|
waitingTaskHandle = nullptr;
|
||||||
taskEXIT_CRITICAL(&activityMux);
|
taskEXIT_CRITICAL(&activityManagerSpinlock);
|
||||||
if (waiter) {
|
if (waiter) {
|
||||||
xTaskNotify(waiter, 1, eIncrement);
|
xTaskNotify(waiter, 1, eIncrement);
|
||||||
}
|
}
|
||||||
@@ -149,8 +140,7 @@ void ActivityManager::loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (requestedUpdate) {
|
if (requestedUpdate.exchange(false)) {
|
||||||
requestedUpdate = false;
|
|
||||||
// Using direct notification to signal the render task to update
|
// Using direct notification to signal the render task to update
|
||||||
// Increment counter so multiple rapid calls won't be lost
|
// Increment counter so multiple rapid calls won't be lost
|
||||||
if (renderTaskHandle) {
|
if (renderTaskHandle) {
|
||||||
@@ -292,7 +282,7 @@ void ActivityManager::requestUpdateAndWait() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Atomic section to perform checks
|
// Atomic section to perform checks
|
||||||
taskENTER_CRITICAL(&activityMux);
|
taskENTER_CRITICAL(&activityManagerSpinlock);
|
||||||
auto currTaskHandler = xTaskGetCurrentTaskHandle();
|
auto currTaskHandler = xTaskGetCurrentTaskHandle();
|
||||||
auto mutexHolder = xSemaphoreGetMutexHolder(renderingMutex);
|
auto mutexHolder = xSemaphoreGetMutexHolder(renderingMutex);
|
||||||
bool isRenderTask = (currTaskHandler == renderTaskHandle);
|
bool isRenderTask = (currTaskHandler == renderTaskHandle);
|
||||||
@@ -301,7 +291,7 @@ void ActivityManager::requestUpdateAndWait() {
|
|||||||
if (!alreadyWaiting && !isRenderTask && !holdingRenderLock) {
|
if (!alreadyWaiting && !isRenderTask && !holdingRenderLock) {
|
||||||
waitingTaskHandle = currTaskHandler;
|
waitingTaskHandle = currTaskHandler;
|
||||||
}
|
}
|
||||||
taskEXIT_CRITICAL(&activityMux);
|
taskEXIT_CRITICAL(&activityManagerSpinlock);
|
||||||
|
|
||||||
// Render task cannot call requestUpdateAndWait() or it will cause a deadlock
|
// Render task cannot call requestUpdateAndWait() or it will cause a deadlock
|
||||||
assert(!isRenderTask && "Render task cannot call requestUpdateAndWait()");
|
assert(!isRenderTask && "Render task cannot call requestUpdateAndWait()");
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <freertos/semphr.h>
|
#include <freertos/semphr.h>
|
||||||
#include <freertos/task.h>
|
#include <freertos/task.h>
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -63,7 +64,7 @@ class ActivityManager {
|
|||||||
|
|
||||||
// Whether to trigger a render after the current loop()
|
// Whether to trigger a render after the current loop()
|
||||||
// This variable must only be set by the main loop, to avoid race conditions
|
// This variable must only be set by the main loop, to avoid race conditions
|
||||||
bool requestedUpdate = false;
|
std::atomic<bool> requestedUpdate{false};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ActivityManager(GfxRenderer& renderer, MappedInputManager& mappedInput)
|
explicit ActivityManager(GfxRenderer& renderer, MappedInputManager& mappedInput)
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ struct PageResult {
|
|||||||
struct ProgressChangeResult {
|
struct ProgressChangeResult {
|
||||||
int spineIndex = 0;
|
int spineIndex = 0;
|
||||||
int page = 0;
|
int page = 0;
|
||||||
|
int totalPages = 0;
|
||||||
|
std::string xpath;
|
||||||
|
float percentage = 0.0f;
|
||||||
|
bool hasSavedProgress = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class NetworkMode;
|
enum class NetworkMode;
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ void SleepActivity::renderDefaultSleepScreen() const {
|
|||||||
renderer.invertScreen();
|
renderer.invertScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer.displayBuffer(HalDisplay::HALF_REFRESH);
|
renderer.displayBuffer(HalDisplay::FULL_REFRESH);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SleepActivity::renderBitmapSleepScreen(const Bitmap& bitmap) const {
|
void SleepActivity::renderBitmapSleepScreen(const Bitmap& bitmap) const {
|
||||||
@@ -218,7 +218,13 @@ void SleepActivity::renderBitmapSleepScreen(const Bitmap& bitmap) const {
|
|||||||
renderer.invertScreen();
|
renderer.invertScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer.displayBuffer(HalDisplay::HALF_REFRESH);
|
if (hasGreyscale) {
|
||||||
|
// OEM grayscale pipeline base: use a full sleep-screen paint so the panel
|
||||||
|
// enters deep sleep from a clean B/W baseline before the gray nudge refresh.
|
||||||
|
renderer.displayGrayscaleBase(HalDisplay::FULL_REFRESH);
|
||||||
|
} else {
|
||||||
|
renderer.displayBuffer(HalDisplay::FULL_REFRESH);
|
||||||
|
}
|
||||||
|
|
||||||
if (hasGreyscale) {
|
if (hasGreyscale) {
|
||||||
bitmap.rewindToData();
|
bitmap.rewindToData();
|
||||||
@@ -325,5 +331,5 @@ void SleepActivity::renderLastScreenSleepScreen() const {
|
|||||||
|
|
||||||
void SleepActivity::renderBlankSleepScreen() const {
|
void SleepActivity::renderBlankSleepScreen() const {
|
||||||
renderer.clearScreen();
|
renderer.clearScreen();
|
||||||
renderer.displayBuffer(HalDisplay::HALF_REFRESH);
|
renderer.displayBuffer(HalDisplay::FULL_REFRESH);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "OpdsBookBrowserActivity.h"
|
#include "OpdsBookBrowserActivity.h"
|
||||||
|
|
||||||
#include <FreeInkUI.h>
|
|
||||||
#include <GfxRenderer.h>
|
#include <GfxRenderer.h>
|
||||||
#include <I18n.h>
|
#include <I18n.h>
|
||||||
#include <Logging.h>
|
#include <Logging.h>
|
||||||
@@ -11,7 +10,6 @@
|
|||||||
#include "SilentRestart.h"
|
#include "SilentRestart.h"
|
||||||
#include "activities/network/WifiSelectionActivity.h"
|
#include "activities/network/WifiSelectionActivity.h"
|
||||||
#include "activities/util/KeyboardEntryActivity.h"
|
#include "activities/util/KeyboardEntryActivity.h"
|
||||||
#include "components/TouchRegistry.h"
|
|
||||||
#include "components/UITheme.h"
|
#include "components/UITheme.h"
|
||||||
#include "fontIds.h"
|
#include "fontIds.h"
|
||||||
#include "network/HttpDownloader.h"
|
#include "network/HttpDownloader.h"
|
||||||
@@ -33,6 +31,7 @@ void OpdsBookBrowserActivity::onEnter() {
|
|||||||
currentPath = "";
|
currentPath = "";
|
||||||
selectorIndex = 0;
|
selectorIndex = 0;
|
||||||
consumeConfirm = false;
|
consumeConfirm = false;
|
||||||
|
consumeBack = false;
|
||||||
errorMessage.clear();
|
errorMessage.clear();
|
||||||
statusMessage = tr(STR_CHECKING_WIFI);
|
statusMessage = tr(STR_CHECKING_WIFI);
|
||||||
requestUpdate();
|
requestUpdate();
|
||||||
@@ -61,6 +60,10 @@ void OpdsBookBrowserActivity::loop() {
|
|||||||
consumeConfirm = false;
|
consumeConfirm = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (consumeBack && mappedInput.wasReleased(MappedInputManager::Button::Back)) {
|
||||||
|
consumeBack = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (state == BrowserState::ERROR) {
|
if (state == BrowserState::ERROR) {
|
||||||
if (mappedInput.wasReleased(MappedInputManager::Button::Confirm)) {
|
if (mappedInput.wasReleased(MappedInputManager::Button::Confirm)) {
|
||||||
@@ -88,28 +91,11 @@ void OpdsBookBrowserActivity::loop() {
|
|||||||
if (state == BrowserState::DOWNLOADING) return;
|
if (state == BrowserState::DOWNLOADING) return;
|
||||||
|
|
||||||
if (state == BrowserState::BROWSING) {
|
if (state == BrowserState::BROWSING) {
|
||||||
if (!entries.empty()) {
|
|
||||||
if (mappedInput.wasListScroll(selectorIndex, static_cast<int>(entries.size()), PAGE_ITEMS)) {
|
|
||||||
requestUpdate();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int downId = -1;
|
|
||||||
if (mappedInput.wasItemTouchedDown(downId) &&
|
|
||||||
freeink::ui::listSelectIndex(selectorIndex, downId, static_cast<int>(entries.size()))) {
|
|
||||||
requestUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
int tappedId = -1;
|
|
||||||
if (mappedInput.wasItemTapped(tappedId) && tappedId >= 0 && tappedId < static_cast<int>(entries.size())) {
|
|
||||||
selectorIndex = tappedId;
|
|
||||||
activateSelectedEntry();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mappedInput.wasReleased(MappedInputManager::Button::Confirm)) {
|
if (mappedInput.wasReleased(MappedInputManager::Button::Confirm)) {
|
||||||
activateSelectedEntry();
|
if (!entries.empty()) {
|
||||||
|
const auto& entry = entries[selectorIndex];
|
||||||
|
entry.type == OpdsEntryType::BOOK ? downloadBook(entry) : navigateToEntry(entry);
|
||||||
|
}
|
||||||
} else if (mappedInput.wasReleased(MappedInputManager::Button::Back)) {
|
} else if (mappedInput.wasReleased(MappedInputManager::Button::Back)) {
|
||||||
navigateBack();
|
navigateBack();
|
||||||
} else if (mappedInput.wasReleased(MappedInputManager::Button::Left)) {
|
} else if (mappedInput.wasReleased(MappedInputManager::Button::Left)) {
|
||||||
@@ -192,20 +178,13 @@ void OpdsBookBrowserActivity::render(RenderLock&&) {
|
|||||||
std::string displayText = (entry.type == OpdsEntryType::NAVIGATION) ? "> " + entry.title : entry.title;
|
std::string displayText = (entry.type == OpdsEntryType::NAVIGATION) ? "> " + entry.title : entry.title;
|
||||||
if (entry.type == OpdsEntryType::BOOK && !entry.author.empty()) displayText += " - " + entry.author;
|
if (entry.type == OpdsEntryType::BOOK && !entry.author.empty()) displayText += " - " + entry.author;
|
||||||
auto item = renderer.truncatedText(UI_10_FONT_ID, displayText.c_str(), pageWidth - 40);
|
auto item = renderer.truncatedText(UI_10_FONT_ID, displayText.c_str(), pageWidth - 40);
|
||||||
const int itemY = 60 + (i % PAGE_ITEMS) * 30;
|
renderer.drawText(UI_10_FONT_ID, 20, 60 + (i % PAGE_ITEMS) * 30, item.c_str(),
|
||||||
renderer.drawText(UI_10_FONT_ID, 20, itemY, item.c_str(), i != static_cast<size_t>(selectorIndex));
|
i != static_cast<size_t>(selectorIndex));
|
||||||
TouchRegistry::getInstance().add(Rect{0, itemY - 2, pageWidth, 30}, static_cast<int>(i), TouchRegistry::Item);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
renderer.displayBuffer();
|
renderer.displayBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpdsBookBrowserActivity::activateSelectedEntry() {
|
|
||||||
if (entries.empty() || selectorIndex < 0 || selectorIndex >= static_cast<int>(entries.size())) return;
|
|
||||||
const auto& entry = entries[selectorIndex];
|
|
||||||
entry.type == OpdsEntryType::BOOK ? downloadBook(entry) : navigateToEntry(entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpdsBookBrowserActivity::fetchFeed(const std::string& path) {
|
void OpdsBookBrowserActivity::fetchFeed(const std::string& path) {
|
||||||
if (server.url.empty()) {
|
if (server.url.empty()) {
|
||||||
state = BrowserState::ERROR;
|
state = BrowserState::ERROR;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class OpdsBookBrowserActivity final : public Activity {
|
|||||||
std::string currentPath;
|
std::string currentPath;
|
||||||
std::string searchTemplate;
|
std::string searchTemplate;
|
||||||
bool consumeConfirm = false;
|
bool consumeConfirm = false;
|
||||||
|
bool consumeBack = false; // Added missing member
|
||||||
int selectorIndex = 0;
|
int selectorIndex = 0;
|
||||||
std::string errorMessage;
|
std::string errorMessage;
|
||||||
std::string statusMessage;
|
std::string statusMessage;
|
||||||
@@ -50,6 +51,5 @@ class OpdsBookBrowserActivity final : public Activity {
|
|||||||
void downloadBook(const OpdsEntry& book);
|
void downloadBook(const OpdsEntry& book);
|
||||||
void launchSearch();
|
void launchSearch();
|
||||||
void performSearch(const std::string& query);
|
void performSearch(const std::string& query);
|
||||||
void activateSelectedEntry();
|
|
||||||
bool preventAutoSleep() override { return true; }
|
bool preventAutoSleep() override { return true; }
|
||||||
};
|
};
|
||||||
@@ -20,9 +20,7 @@ void CrashActivity::onEnter() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CrashActivity::loop() {
|
void CrashActivity::loop() {
|
||||||
int tapX = 0;
|
if (mappedInput.isPressed(MappedInputManager::Button::Back)) {
|
||||||
int tapY = 0;
|
|
||||||
if (mappedInput.isPressed(MappedInputManager::Button::Back) || mappedInput.wasScreenTapped(tapX, tapY)) {
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loaded 100 of 188 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user