update mupdf and k2pdfopt to latest versions

pull/810/head
chrox 10 years ago
parent 507b989747
commit fe14809bdf

@ -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",

@ -1 +1 @@
Subproject commit 3dc42b01bc52701dd3682f32b64d1498b28b895b
Subproject commit 32dae406abd6667e3ff0793c8d09584d21ca5693
Loading…
Cancel
Save