8.3 KiB
EPUB 3.3 Compliance Feature Prioritization
Date: 2026-01-23 19:46:02
Based on: EPUB 3.3 Compliance Audit
Overview
This document reviews the audit findings from the CrossPoint Reader EPUB 3.3 compliance audit and prioritizes features for implementation based on:
- User Impact - How much the feature improves the reading experience
- Implementation Complexity - Level of effort required
- Existing Infrastructure - Available code that can be leveraged
- Hardware Feasibility - Whether the e-ink display can support it
Priority 1: High Impact, Infrastructure Ready
These features have existing code that can be leveraged and provide significant user value.
1.1 Inline Image Rendering
Current State: Images show placeholder text [Image: alt_text]
Infrastructure Available:
Bitmapclass (lib/GfxRenderer/Bitmap.h) - BMP parsing with grayscale conversion and ditheringJpegToBmpConverter(lib/JpegToBmpConverter/) - JPEG to BMP conversion with prescalingGfxRenderer::drawBitmap()- Already renders bitmaps to e-ink displayZipFile- Can extract images from EPUB archive
Implementation Approach:
- Extend
ChapterHtmlSlimParserto extract imagesrcattributes - Create
PageImageelement (alongside existingPageLine) - Extract and cache images from EPUB ZIP to SD card as BMP
- Integrate image blocks into page layout calculations
- Render images inline with text during page display
Complexity: Medium
User Impact: High - Many EPUBs have important diagrams, illustrations, and decorative images
Supported Formats:
- JPEG (via
picojpeg) - Most common in EPUBs - BMP (native support)
- PNG - Not currently supported (would need
pngleor similar library)
1.2 List Markers (Bullets and Numbers)
Current State: List items render without visual markers; <li> already adds bullet character
Infrastructure Available:
ChapterHtmlSlimParseralready handles<li>tags (line 248 adds bullet)- Font system supports Unicode characters
Implementation Approach:
- Track list type (
<ol>vs<ul>) in parser state - For
<ol>: maintain counter, render as "1.", "2.", etc. - For
<ul>: use bullet character (already implemented:\xe2\x80\xa2) - Apply text indentation for list item content
Current Code (already adds bullet):
if (strcmp(name, "li") == 0) {
self->currentTextBlock->addWord("\xe2\x80\xa2", EpdFontFamily::REGULAR);
}
Complexity: Low
User Impact: Medium - Improves readability of enumerated content
1.3 Nested List Indentation
Current State: Nested lists are flattened to same indentation level
Implementation Approach:
- Track nesting depth in parser (
listDepthcounter) - Apply progressive
text-indentbased on depth (e.g., 20px per level) - Store depth in
BlockStylefor rendering
Complexity: Low
User Impact: Medium - Important for technical documentation and outlines
Priority 2: Medium Impact, Moderate Complexity
2.1 Basic Table Rendering
Current State: Tables show [Table omitted] placeholder
Implementation Approach:
- Parse table structure (
<table>,<tr>,<td>,<th>) - Calculate column widths based on content or proportional division
- Render as text rows with column separators (e.g.,
|character) - Apply header styling (bold) for
<th>elements
Constraints:
- Fixed-width font may be needed for alignment
- Complex tables (colspan, rowspan) would remain unsupported
- Wide tables may need horizontal truncation
Complexity: Medium-High
User Impact: Medium - Some EPUBs have data tables, but many don't
2.2 Internal Link Navigation
Current State: Links render as plain text, not interactive
Implementation Approach:
- Parse
<a href="#id">attributes during HTML parsing - Store link targets in page elements
- Add UI for link selection (highlight/underline links)
- Implement navigation to target anchor when activated
- Handle cross-chapter links (resolve to spine + anchor)
Complexity: Medium-High (requires UI changes)
User Impact: Medium - Important for reference material, footnotes
2.3 Line Height CSS Support
Current State: Line height is fixed based on font metrics
Implementation Approach:
- Add
line-heightproperty toCssParser - Store in
CssStylestruct - Apply multiplier to
getLineHeight()during layout
Complexity: Low
User Impact: Medium - Improves text density matching to publisher intent
Priority 3: Lower Impact or Higher Complexity
3.1 Font Size CSS Support
Current State: Font size controlled by reader settings only
Implementation Approach:
- Parse
font-sizeinCssParser(relative units: em, rem, %) - Map to available font sizes (snap to nearest)
- Apply during text rendering
Constraints:
- Limited font size options in bitmap fonts
- Large size changes may cause layout issues
Complexity: Medium
User Impact: Low-Medium - Most content uses default sizing
3.2 Page-List Navigation
Current State: Only TOC navigation supported
Implementation Approach:
- Parse
<nav epub:type="page-list">in navigation document - Store page reference mappings
- Add UI to jump to specific page numbers
Complexity: Medium
User Impact: Low - Useful for academic/reference texts with page citations
3.3 Landmarks Navigation
Current State: Not implemented
Implementation Approach:
- Parse
<nav epub:type="landmarks"> - Extract semantic markers (cover, toc, bodymatter, etc.)
- Add quick-nav UI
Complexity: Low-Medium
User Impact: Low - Convenience feature
Features NOT Recommended for Implementation
These features are either hardware-limited or provide minimal value for the target use case.
Hardware Limited (Cannot Implement)
| Feature | Reason |
|---|---|
| Color images/CSS | Monochrome 4-level grayscale display |
| Audio playback | No audio hardware |
| Video playback | No video hardware, e-ink refresh too slow |
| Animations | E-ink refresh latency incompatible |
| Media Overlays | Requires audio hardware |
Not Worth Implementing
| Feature | Reason |
|---|---|
| JavaScript | Security concerns, minimal EPUB use, high complexity |
| Fixed Layout (FXL) | Designed for tablets; poor e-ink experience |
| SVG | Complex parser needed, limited use in text EPUBs |
| MathML | Extremely complex, niche use case |
| CSS Grid/Flexbox | Overkill for text layout |
| @font-face | Memory constraints, limited benefit |
| DRM | Licensing complexity, user expectation of DRM-free |
| Forms | Interactive elements unsuitable for e-ink |
Implementation Roadmap
Phase 1: Quick Wins (Low Effort, High Value)
List bullet rendering(already implemented)- Ordered list numbering
- Nested list indentation
- Line-height CSS support
Phase 2: Image Support (Medium Effort, High Value)
- JPEG image extraction and caching
- BMP image support
PageImageelement integration- Image scaling to viewport width
- (Optional) PNG support via external library
Phase 3: Enhanced Navigation (Medium Effort, Medium Value)
- Internal link parsing
- Link highlighting/selection UI
- Anchor navigation within chapters
- Cross-chapter link navigation
Phase 4: Table Support (High Effort, Medium Value)
- Basic table parsing
- Simple column layout
- Text-based table rendering
- Header styling
Summary
| Priority | Feature | Complexity | Impact | Dependencies |
|---|---|---|---|---|
| 1.1 | Inline Images | Medium | High | Bitmap, JpegToBmpConverter |
| 1.2 | Ordered List Numbers | Low | Medium | None |
| 1.3 | Nested List Indent | Low | Medium | None |
| 2.1 | Basic Tables | Medium-High | Medium | None |
| 2.2 | Internal Links | Medium-High | Medium | UI changes |
| 2.3 | Line Height CSS | Low | Medium | CssParser |
| 3.1 | Font Size CSS | Medium | Low-Medium | Font system |
| 3.2 | Page-List Nav | Medium | Low | Navigation system |
| 3.3 | Landmarks Nav | Low-Medium | Low | Navigation system |
Recommended First Implementation: Start with Phase 1 quick wins (list improvements, line-height), then proceed to Image Support as it has the highest user-visible impact and leverages existing infrastructure.