mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Setting the hyph algo before loading the document may save crengine from re-doing some expensive work at render time (the hyph algo is accounted in the nodeStyleHash, and would cause a mismatch if it is different at render time from how it was at load time - "English US" by default - causing a full re-init of the nodes styles.) We will only re-set it on pre-render (only then, after loading, we know the document language) if it's really needed: when no algo saved in book settings, no default algo, and book has some language defined.