Merge pull request #739 from WS64/master

remember font weight also from global settings and at least line spacing from defaults
pull/740/head
Huang Xin 10 years ago
commit 52bdc01138

@ -75,13 +75,14 @@ function ReaderFont:onReadSettings(config)
self.ui.document:setHeaderFont(self.header_font_face)
--@TODO change this! 12.01 2013 (houqp)
self.font_size = config:readSetting("font_size") or DCREREADER_CONFIG_DEFAULT_FONT_SIZE
self.font_size = config:readSetting("font_size") or DCREREADER_CONFIG_DEFAULT_FONT_SIZE or 22
self.ui.document:setFontSize(Screen:scaleByDPI(self.font_size))
self.font_embolden = config:readSetting("font_embolden") or 0
self.font_embolden = config:readSetting("font_embolden") or G_reader_settings:readSetting("copt_font_weight") or 0
self.ui.document:toggleFontBolder(self.font_embolden)
self.line_space_percent = config:readSetting("line_space_percent") or 100
--@TODO still missing: line_spacing from settings.reader.lua (so far just decrease/increase in there) 18.07.2014 (WS64)
self.line_space_percent = config:readSetting("line_space_percent") or (DKOPTREADER_CONFIG_LINE_SPACING or 1.2)*100
self.ui.document:setInterlineSpacePercent(self.line_space_percent)
self.gamma_index = config:readSetting("gamma_index") or 15

Loading…
Cancel
Save