github marcoand75/cpr-vcodex-steroids 1.5.0.9-dev3-cpr-vcodex-steroids

Fix: blank pages (white text) in the reader

Summary

Fixed a regression introduced by the CrossInk engine integration where EPUB pages could render with invisible text — the page background, status bar, page count, and prev/next navigation all worked perfectly, but the actual text was drawn white-on-white and simply did not appear.

What was the bug

The CrossInk engine changed the meaning of a parameter in the page-rendering call:

Previous engine (v1.5.0.9-dev1) CrossInk engine
Parameter bionicReadingMode (0 = Off) foregroundBlack (true/false)

The reader kept passing SETTINGS.bionicReading into this parameter. So:

  • Bionic Reading OFF (= 0) was interpreted as foregroundBlack = false → the text was drawn in white, invisible on the white page.
  • Bionic Reading ON (= 1 or 2) translated to true → the text rendered normally.

This is why the issue affected books/readers with Bionic Reading turned off, while others appeared fine.

The fix

  • All page-render call sites now always pass foregroundBlack = true. Bionic Reading is already applied earlier in the process (at page layout time), so the rendering step no longer needs — and must no longer receive — that setting as a color switch.
  • Bonus fix: the font cache is no longer wiped after every single page render. Previously the prewarm cache was cleared right after it was built, causing every page to start from scratch. The cache now survives between pages, reducing re-loading work.

Result

  • EPUB text renders correctly regardless of the Bionic Reading setting.
  • More efficient font caching between page turns.

Don't miss a new cpr-vcodex-steroids release

NewReleases is sending notifications on new releases.