As I described yesterday, Papyrix's page-cache can defer to logic for laying out paragraphs of plaintext into a layout/rendering tree. So what objects might a Papyrix layout be constructed from?
There's a PageElement superclass with x/y coordinates, as well as PageLine & PageImage subclasses both wrapping a block object. While a Page wraps an array of such elements.
There's a method to test whether any of those are PageImages, & a method to get min/max coords on both axis.
1/?
These objects have Render methods deferring to their inner objects, as well as (de)serialization methods (aided by a support library I've already studied) so it can be cached in the SD card.
That said PageImages might clear its background 1st.
Pages might traverse its tree to gather a histogram of required glyphs, & sort that transient array to prefetch them.
There's a RenderConfig struct specifying various text-layout parameters.
2/3?