[feat] Add MuPDF EPUB/FB2 dynamic font size (#5282)

Closes #4368.
This commit is contained in:
Frans de Jonge
2019-08-30 13:47:51 +02:00
committed by GitHub
parent f6270278aa
commit f1f6eebce0
9 changed files with 60 additions and 18 deletions

View File

@@ -211,7 +211,11 @@ function ReaderZooming:onPageUpdate(new_page_no)
self:setZoom()
end
function ReaderZooming:onReZoom()
function ReaderZooming:onReZoom(font_size)
if self.document.is_reflowable then
local reflowable_font_size = self.document:convertKoptToReflowableFontSize(font_size)
self.document:layoutDocument(reflowable_font_size)
end
self:setZoom()
self.ui:handleEvent(Event:new("InitScrollPageStates"))
return true