mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
cre: add Word Gap setting to bottom config panel (#4026)
Maps to crengine's Space Condensing feature (named Word Gap as a similar feature is named for PDF)
This commit is contained in:
@@ -132,13 +132,6 @@ function CreDocument:init()
|
||||
G_reader_settings:readSetting("cre_header_status_font_size"))
|
||||
end
|
||||
|
||||
-- min space condensing percent (how much we can decrease a space width to
|
||||
-- make text fit on a line) default is 50%
|
||||
if G_reader_settings:readSetting("cre_min_space_condensing_percent") then
|
||||
self._document:setIntProperty("crengine.style.space.condensing.percent",
|
||||
G_reader_settings:readSetting("cre_min_space_condensing_percent"))
|
||||
end
|
||||
|
||||
-- set fallback font face
|
||||
self._document:setStringProperty("crengine.font.fallback.face",
|
||||
G_reader_settings:readSetting("fallback_font") or self.fallback_font)
|
||||
@@ -527,6 +520,13 @@ function CreDocument:setFontHinting(mode)
|
||||
self._document:setIntProperty("font.hinting.mode", mode)
|
||||
end
|
||||
|
||||
-- min space condensing percent (how much we can decrease a space width to
|
||||
-- make text fit on a line) 25...100%
|
||||
function CreDocument:setSpaceCondensing(value)
|
||||
logger.dbg("CreDocument: set space condensing", value)
|
||||
self._document:setIntProperty("crengine.style.space.condensing.percent", value)
|
||||
end
|
||||
|
||||
function CreDocument:setStyleSheet(new_css_file, appended_css_content )
|
||||
logger.dbg("CreDocument: set style sheet:",
|
||||
new_css_file and new_css_file or "no file",
|
||||
|
||||
Reference in New Issue
Block a user