add readerconfig to document supported by crengine

* now font size can be changed by readerconfig
This commit is contained in:
Qingping Hou
2013-01-06 23:21:11 -05:00
parent ba00dcc701
commit fdc05b066c
4 changed files with 44 additions and 7 deletions

View File

@@ -110,6 +110,17 @@ function ReaderFont:onChangeSize(direction)
return true
end
function ReaderFont:onSetFontSize(new_size)
if new_size > 44 then new_size = 44 end
if new_size < 18 then new_size = 18 end
self.font_size = new_size
self.ui.document:setFontSize(new_size)
self.ui:handleEvent(Event:new("UpdatePos"))
return true
end
function ReaderFont:onChangeLineSpace(direction)
if direction == "decrease" then
self.line_space_percent = self.line_space_percent - 10