Add FreeInkBook EPUB engine migration guide

Document migration plan from CrossPoint's lib/Epub to FreeInkBook, a memory-efficient clean-room EPUB engine. Covers advantages (O(paragraph+page) memory via SAX parsing, arena allocation, host-testable, full UAX#14 typography, runtime TTF/OTF support), 9-step migration strategy, ESP32-C3 constraints, and integration approach preserving existing UI layer while replacing parsing/layout stack.
This commit is contained in:
Justin Mitchell
2026-07-08 00:22:21 -04:00
parent 5776911af0
commit 0848649ce2
49 changed files with 1065 additions and 15633 deletions
+15
View File
@@ -154,6 +154,21 @@ uint32_t EpdFont::applyLigatures(uint32_t cp, const char*& text) const {
return cp;
}
bool EpdFont::hasGlyph(const uint32_t cp) const {
const int count = data->intervalCount;
if (count > 0) {
const EpdUnicodeInterval* intervals = data->intervals;
const auto it =
std::upper_bound(intervals, intervals + count, cp,
[](uint32_t value, const EpdUnicodeInterval& interval) { return value < interval.first; });
if (it != intervals && cp <= (it - 1)->last) return true;
}
if (data->glyphMissHandler) {
return data->glyphMissHandler(data->glyphMissCtx, cp) != nullptr;
}
return false;
}
const EpdGlyph* EpdFont::getGlyph(const uint32_t cp) const {
const int count = data->intervalCount;
if (count == 0 && !data->glyphMissHandler) return nullptr;