mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
update mupdf and k2pdfopt to latest versions
This commit is contained in:
@@ -96,8 +96,8 @@ DKOPTREADER_CONFIG_MAX_COLUMNS = 2 -- range from 1 to 4
|
||||
DKOPTREADER_CONFIG_CONTRAST = 1.0 -- range from 0.2 to 2.0
|
||||
|
||||
-- word spacing for reflow
|
||||
DKOPTREADER_CONFIG_WORD_SAPCINGS = {0.05, -1, 0.375} -- range from 0.05 to 0.5
|
||||
DKOPTREADER_CONFIG_DEFAULT_WORD_SAPCING = -1 -- range from 0.05 to 0.5
|
||||
DKOPTREADER_CONFIG_WORD_SPACINGS = {0.05, -0.2, 0.375} -- range from (+/-)0.05 to (+/-)0.5
|
||||
DKOPTREADER_CONFIG_DEFAULT_WORD_SPACING = -0.2 -- range from (+/-)0.05 to (+/-)0.5
|
||||
-- document languages for OCR
|
||||
DKOPTREADER_CONFIG_DOC_LANGS_TEXT = {"English", "Chinese"}
|
||||
DKOPTREADER_CONFIG_DOC_LANGS_CODE = {"eng", "chi_sim"} -- language code, make sure you have corresponding training data
|
||||
|
||||
@@ -20,6 +20,11 @@ function ReaderKoptListener:onReadSettings(config)
|
||||
self.document.configurable.contrast = config:readSetting("kopt_contrast") or
|
||||
G_reader_settings:readSetting("kopt_contrast") or 1.0
|
||||
self.ui:handleEvent(Event:new("GammaUpdate", 1/self.document.configurable.contrast))
|
||||
-- since K2pdfopt v2.21 negative value of word spacing is also used, for config
|
||||
-- compatability we should manually change previous -1 to a more reasonable -0.2
|
||||
if self.document.configurable.word_spacing == -1 then
|
||||
self.document.configurable.word_spacing = -0.2
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderKoptListener:onSaveSettings()
|
||||
|
||||
@@ -186,8 +186,8 @@ local KoptOptions = {
|
||||
name = "word_spacing",
|
||||
name_text = S.WORD_GAP,
|
||||
toggle = {S.SMALL, S.AUTO, S.LARGE},
|
||||
values = DKOPTREADER_CONFIG_WORD_SAPCINGS,
|
||||
default_value = DKOPTREADER_CONFIG_DEFAULT_WORD_SAPCING,
|
||||
values = DKOPTREADER_CONFIG_WORD_SPACINGS,
|
||||
default_value = DKOPTREADER_CONFIG_DEFAULT_WORD_SPACING,
|
||||
},
|
||||
{
|
||||
name = "writing_direction",
|
||||
|
||||
Submodule koreader-base updated: 3dc42b01bc...32dae406ab
Reference in New Issue
Block a user