read font settings on readsettings event
This commit is contained in:
1 parent
0e122b12bf
commit
59592e862e
1 file changed
+12
-9
@@ -26,21 +26,24 @@ ReaderFont = InputContainer:new{
|
||||
}
|
||||
|
||||
function ReaderFont:init()
|
||||
self.font_face = self.ui.doc_settings:readSetting("font_face")
|
||||
if not self.font_face then
|
||||
self.font_face = self.ui.document:getFontFace()
|
||||
end
|
||||
|
||||
self.font_size = self.ui.doc_settings:readSetting("font_size")
|
||||
if not self.font_size then
|
||||
self.font_size = self.ui.document:getFontSize()
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderFont:onSetDimensions(dimen)
|
||||
self.dimen = dimen
|
||||
end
|
||||
|
||||
function ReaderFont:onReadSettings(config)
|
||||
self.font_face = config:readSetting("font_face")
|
||||
if not self.font_face then
|
||||
self.font_face = self.ui.document:getFontFace()
|
||||
end
|
||||
|
||||
self.font_size = config:readSetting("font_size")
|
||||
if not self.font_size then
|
||||
self.font_size = self.ui.document:getFontSize()
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderFont:onShowFontMenu()
|
||||
-- build menu item_table
|
||||
local face_list = cre.getFontFaces()
|
||||
|
||||
Reference in new issue
Block a user