2014-06-18 17:18:27 +00:00
|
|
|
-- To make configuration changes that persists between (nightly) releases,
|
2022-09-27 23:10:50 +00:00
|
|
|
-- copy defaults.lua to defaults.custom.lua and make the changes there,
|
|
|
|
-- or go to [Tools] > More tools > Advanced settings in the filemanager.
|
2013-07-01 06:41:33 +00:00
|
|
|
|
2022-09-27 23:10:50 +00:00
|
|
|
return {
|
2013-09-14 07:27:11 +00:00
|
|
|
-- number of pages for hinting
|
2014-03-09 08:48:13 +00:00
|
|
|
-- default to pre-rendering 1 page
|
2022-09-27 23:10:50 +00:00
|
|
|
DHINTCOUNT = 1,
|
2013-07-01 06:41:33 +00:00
|
|
|
|
|
|
|
-- DjVu page rendering mode (used in djvu.c:drawPage())
|
|
|
|
-- See comments in djvureader.lua:DJVUReader:select_render_mode()
|
2022-09-27 23:10:50 +00:00
|
|
|
DRENDER_MODE = 0, -- 0 is COLOUR
|
2013-07-01 06:41:33 +00:00
|
|
|
|
2014-01-19 03:40:34 +00:00
|
|
|
-- minimum cache size
|
2022-09-27 23:10:50 +00:00
|
|
|
DGLOBAL_CACHE_SIZE_MINIMUM = 1024*1024*16,
|
2014-01-19 03:40:34 +00:00
|
|
|
|
|
|
|
-- proportion of system free memory used as global cache
|
2022-09-27 23:10:50 +00:00
|
|
|
DGLOBAL_CACHE_FREE_PROPORTION = 0.4,
|
2014-01-19 03:40:34 +00:00
|
|
|
|
|
|
|
-- maximum cache size
|
2022-09-27 23:10:50 +00:00
|
|
|
DGLOBAL_CACHE_SIZE_MAXIMUM = 1024*1024*512,
|
2013-07-01 06:41:33 +00:00
|
|
|
|
|
|
|
-- background colour in non scroll mode: 8 = gray, 0 = white, 15 = black
|
2022-09-27 23:10:50 +00:00
|
|
|
DBACKGROUND_COLOR = 0,
|
2013-07-01 06:41:33 +00:00
|
|
|
|
|
|
|
-- outer page colour in scroll mode: 8 = gray, 0 = white, 15 = black
|
2022-09-27 23:10:50 +00:00
|
|
|
DOUTER_PAGE_COLOR = 0,
|
2013-07-01 06:41:33 +00:00
|
|
|
|
2020-12-19 11:18:30 +00:00
|
|
|
-- generic icon size
|
2022-09-27 23:10:50 +00:00
|
|
|
DGENERIC_ICON_SIZE = 40,
|
2020-12-19 11:18:30 +00:00
|
|
|
|
2013-07-01 06:41:33 +00:00
|
|
|
-- supported view mode includes: "scroll" and "page"
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_VIEW_MODE = "page",
|
2013-07-01 06:41:33 +00:00
|
|
|
|
2013-09-14 11:35:32 +00:00
|
|
|
-- show dimmed area to indicate page overlap in "page" view mode,
|
|
|
|
-- default to false
|
2022-09-27 23:10:50 +00:00
|
|
|
DSHOWOVERLAP = false,
|
2013-09-14 11:35:32 +00:00
|
|
|
|
2014-07-15 10:16:41 +00:00
|
|
|
-- default minimum screen height for reading with 2 pages in landscape mode
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_TWO_PAGE_THRESHOLD = 7,
|
2014-07-15 10:16:41 +00:00
|
|
|
|
2014-02-16 11:42:50 +00:00
|
|
|
-- page overlap pixels
|
2022-09-27 23:10:50 +00:00
|
|
|
DOVERLAPPIXELS = 30,
|
2014-02-16 11:42:50 +00:00
|
|
|
|
2014-12-03 04:55:53 +00:00
|
|
|
-- timeout to show link rectangle around links
|
|
|
|
-- default to 0.5 second
|
|
|
|
-- set to 0 to disable showing rectangle and follow link immediately
|
2022-09-27 23:10:50 +00:00
|
|
|
FOLLOW_LINK_TIMEOUT = 0.5,
|
2014-12-03 04:55:53 +00:00
|
|
|
|
2013-12-15 09:02:52 +00:00
|
|
|
-- customizable tap zones(rectangles)
|
2019-04-07 17:00:15 +00:00
|
|
|
-- x: x coordinate of top left corner in proportion to screen width
|
|
|
|
-- y: y coordinate of top left corner in proportion to screen height
|
|
|
|
-- w: tap zone width in proportion to screen width
|
|
|
|
-- h: tap zone height in proportion to screen height
|
2022-09-27 23:10:50 +00:00
|
|
|
DTAP_ZONE_MENU = {x = 0, y = 0, w = 1, h = 1/8},
|
|
|
|
DTAP_ZONE_MENU_EXT = {x = 1/4, y = 0, w = 2/4, h = 1/5}, -- taller, narrower extension
|
|
|
|
DTAP_ZONE_CONFIG = {x = 0, y = 7/8, w = 1, h = 1/8},
|
|
|
|
DTAP_ZONE_CONFIG_EXT = {x = 1/4, y = 4/5, w = 2/4, h = 1/5}, -- taller, narrower extension
|
|
|
|
DTAP_ZONE_MINIBAR = {x = 0, y = 12/13, w = 1, h = 1/13},
|
|
|
|
DTAP_ZONE_FORWARD = {x = 1/4, y = 0, w = 3/4, h = 1},
|
|
|
|
DTAP_ZONE_BACKWARD = {x = 0, y = 0, w = 1/4, h = 1},
|
|
|
|
DTAP_ZONE_TOP_LEFT = {x = 0, y = 0, w = 1/8, h = 1/8},
|
|
|
|
DTAP_ZONE_TOP_RIGHT = {x = 7/8, y = 0, w = 1/8, h = 1/8},
|
|
|
|
DTAP_ZONE_BOTTOM_LEFT = {x = 0, y = 7/8, w = 1/8, h = 1/8},
|
|
|
|
DTAP_ZONE_BOTTOM_RIGHT = {x = 7/8, y = 7/8, w = 1/8, h = 1/8},
|
|
|
|
DDOUBLE_TAP_ZONE_NEXT_CHAPTER = {x = 1/4, y = 0, w = 3/4, h = 1},
|
|
|
|
DDOUBLE_TAP_ZONE_PREV_CHAPTER = {x = 0, y = 0, w = 1/4, h = 1},
|
2023-11-25 04:03:05 +00:00
|
|
|
DSWIPE_ZONE_LEFT_EDGE = { x = 0, y = 0, w = 1/8, h = 1},
|
|
|
|
DSWIPE_ZONE_RIGHT_EDGE = { x = 7/8, y = 0, w = 1/8, h = 1},
|
|
|
|
DSWIPE_ZONE_TOP_EDGE = { x = 0, y = 0, w = 1, h = 1/8},
|
|
|
|
DSWIPE_ZONE_BOTTOM_EDGE = { x = 0, y = 7/8, w = 1, h = 1/8},
|
2014-07-03 16:12:41 +00:00
|
|
|
|
2013-07-01 06:41:33 +00:00
|
|
|
-- koptreader config defaults
|
2022-09-27 23:10:50 +00:00
|
|
|
DKOPTREADER_CONFIG_FONT_SIZE = 1.0, -- range from 0.1 to 3.0
|
|
|
|
DKOPTREADER_CONFIG_TEXT_WRAP = 0, -- 1 = on, 0 = off
|
|
|
|
DKOPTREADER_CONFIG_TRIM_PAGE = 1, -- 1 = auto, 0 = manual
|
|
|
|
DKOPTREADER_CONFIG_DETECT_INDENT = 1, -- 1 = enable, 0 = disable
|
|
|
|
DKOPTREADER_CONFIG_DEFECT_SIZE = 1.0, -- range from 0.0 to 3.0
|
|
|
|
DKOPTREADER_CONFIG_PAGE_MARGIN = 0.10, -- range from 0.0 to 1.0
|
|
|
|
DKOPTREADER_CONFIG_LINE_SPACING = 1.2, -- range from 0.5 to 2.0
|
|
|
|
DKOPTREADER_CONFIG_RENDER_QUALITY = 1.0, -- range from 0.5 to 2.0
|
|
|
|
DKOPTREADER_CONFIG_AUTO_STRAIGHTEN = 0, -- range from 0 to 10
|
|
|
|
DKOPTREADER_CONFIG_JUSTIFICATION = 3, -- -1 = auto, 0 = left, 1 = center, 2 = right, 3 = full
|
|
|
|
DKOPTREADER_CONFIG_MAX_COLUMNS = 2, -- range from 1 to 4
|
|
|
|
DKOPTREADER_CONFIG_CONTRAST = 1.0, -- range from 0.2 to 2.0
|
2013-07-01 06:41:33 +00:00
|
|
|
|
2013-07-19 19:33:58 +00:00
|
|
|
-- word spacing for reflow
|
2022-09-27 23:10:50 +00:00
|
|
|
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
|
2013-07-19 18:46:51 +00:00
|
|
|
-- document languages for OCR
|
2022-09-27 23:10:50 +00:00
|
|
|
DKOPTREADER_CONFIG_DOC_LANGS_TEXT = {"English", "Chinese"},
|
|
|
|
DKOPTREADER_CONFIG_DOC_LANGS_CODE = {"eng", "chi_sim"}, -- language code, make sure you have corresponding training data
|
|
|
|
DKOPTREADER_CONFIG_DOC_DEFAULT_LANG_CODE = "eng", -- that have filenames starting with the language codes
|
2013-07-19 19:33:58 +00:00
|
|
|
|
2013-10-16 09:06:28 +00:00
|
|
|
-- crereader font sizes
|
|
|
|
-- feel free to add more entries in this list
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_CONFIG_FONT_SIZES = {12, 16, 20, 22, 24, 26, 28, 30, 34, 38, 44}, -- option range from 12 to 44
|
|
|
|
DCREREADER_CONFIG_DEFAULT_FONT_SIZE = 22, -- default font size
|
2013-10-16 09:06:28 +00:00
|
|
|
|
2013-12-28 10:39:42 +00:00
|
|
|
-- crereader margin sizes
|
2019-05-01 00:09:01 +00:00
|
|
|
-- horizontal margins {left, right} in (relative) pixels
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_SMALL = {5, 5},
|
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_MEDIUM = {10, 10},
|
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_LARGE = {15, 15},
|
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_X_LARGE = {20, 20},
|
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_XX_LARGE = {30, 30},
|
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_XXX_LARGE = {50, 50},
|
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_HUGE = {70, 70},
|
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_X_HUGE = {100, 100},
|
|
|
|
DCREREADER_CONFIG_H_MARGIN_SIZES_XX_HUGE = {140, 140},
|
2019-05-01 00:09:01 +00:00
|
|
|
|
|
|
|
-- top margin in (relative) pixels
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_SMALL = 5,
|
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_MEDIUM = 10,
|
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_LARGE = 15,
|
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_X_LARGE = 20,
|
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_XX_LARGE = 30,
|
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_XXX_LARGE = 50,
|
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_HUGE = 70,
|
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_X_HUGE = 100,
|
|
|
|
DCREREADER_CONFIG_T_MARGIN_SIZES_XX_HUGE = 140,
|
2019-05-01 00:09:01 +00:00
|
|
|
|
|
|
|
-- bottom margin in (relative) pixels
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_SMALL = 5,
|
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_MEDIUM = 10,
|
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_LARGE = 15,
|
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_X_LARGE = 20,
|
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_XX_LARGE = 30,
|
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_XXX_LARGE = 50,
|
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_HUGE = 70,
|
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_X_HUGE = 100,
|
|
|
|
DCREREADER_CONFIG_B_MARGIN_SIZES_XX_HUGE = 140,
|
2014-08-17 13:45:48 +00:00
|
|
|
|
|
|
|
-- crereader line space percentage
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_X_TINY = 70,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_TINY = 75,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_XX_SMALL = 80,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_X_SMALL = 85,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_SMALL = 90,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_L_SMALL = 95,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_MEDIUM = 100,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_L_MEDIUM = 105,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_XL_MEDIUM = 110,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_XXL_MEDIUM = 115,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_LARGE = 120,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_X_LARGE = 125,
|
|
|
|
DCREREADER_CONFIG_LINE_SPACE_PERCENT_XX_LARGE = 130,
|
2014-08-17 13:45:48 +00:00
|
|
|
|
2019-11-28 21:39:06 +00:00
|
|
|
-- word spacing percentages
|
|
|
|
-- 1st number scales the normal width of spaces in all font
|
|
|
|
-- (100% uses the font space width untouched)
|
|
|
|
-- 2nd number applies after the 1st has been applied, and
|
|
|
|
-- tells how much these spaces can additionally be condensed
|
|
|
|
-- to make more text fit on a line.
|
|
|
|
-- So, {80,50} can reduce the width of a space up to 40% of its
|
|
|
|
-- regular width. {99, 100} allows reducing it by at least 1px.
|
|
|
|
-- (These replace the old settings DCREREADER_CONFIG_WORD_GAP_*,
|
|
|
|
-- with the equivalence: new_option = { 100, old_option }.)
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_CONFIG_WORD_SPACING_SMALL = {75, 50},
|
|
|
|
DCREREADER_CONFIG_WORD_SPACING_MEDIUM = {95, 75},
|
|
|
|
DCREREADER_CONFIG_WORD_SPACING_LARGE = {100, 90},
|
2018-07-03 13:29:04 +00:00
|
|
|
|
2020-05-03 16:06:58 +00:00
|
|
|
-- word expansion, to reduce excessive spacing on justified line
|
|
|
|
-- by using letter spacing on the words
|
|
|
|
-- value is the max allowed added letter spacing, as a % of the font size
|
2022-09-27 23:10:50 +00:00
|
|
|
DCREREADER_CONFIG_WORD_EXPANSION_NONE = 0,
|
|
|
|
DCREREADER_CONFIG_WORD_EXPANSION_SOME = 5,
|
|
|
|
DCREREADER_CONFIG_WORD_EXPANSION_MORE = 15,
|
2014-02-12 07:43:38 +00:00
|
|
|
|
2014-07-02 08:30:22 +00:00
|
|
|
-- configure "mini" progress bar
|
2022-09-27 23:10:50 +00:00
|
|
|
DMINIBAR_CONTAINER_HEIGHT = 14, -- Larger means more padding at the bottom, at the risk of eating into the last line
|
2014-01-10 03:12:51 +00:00
|
|
|
|
2016-04-16 10:21:49 +00:00
|
|
|
-- Normally, KOReader will present file lists sorted in case insensitive manner
|
2014-11-16 18:27:31 +00:00
|
|
|
-- when presenting an alphatically sorted list. So the Order is "A, b, C, d".
|
|
|
|
-- You can switch to a case sensitive sort ("A", "C", "b", "d") by disabling
|
|
|
|
-- insensitive sort
|
2022-09-27 23:10:50 +00:00
|
|
|
DALPHA_SORT_CASE_INSENSITIVE = true,
|
2014-08-07 07:13:27 +00:00
|
|
|
|
2022-10-30 21:34:48 +00:00
|
|
|
-- Frontlight behavior on Kobo
|
|
|
|
KOBO_LIGHT_ON_START = -2, -- -1, -2 or 0-100.
|
|
|
|
-- -1 uses the brightness set by KOReader (if any, 20% otherwise)
|
|
|
|
-- -2 uses the brightness set in Nickel
|
|
|
|
KOBO_SYNC_BRIGHTNESS_WITH_NICKEL = true, -- Update Nickel's config to match our own
|
2014-08-07 07:13:27 +00:00
|
|
|
|
2014-10-05 08:04:49 +00:00
|
|
|
-- Network proxy settings
|
|
|
|
-- proxy url should be a string in the format of "http://localhost:3128"
|
|
|
|
-- proxy authentication is not supported yet.
|
2022-09-27 23:10:50 +00:00
|
|
|
NETWORK_PROXY = nil,
|
2014-10-05 08:04:49 +00:00
|
|
|
|
2015-06-02 05:07:17 +00:00
|
|
|
-- Experimental features
|
|
|
|
-- Use turbo library to handle async HTTP request
|
2022-09-27 23:10:50 +00:00
|
|
|
DUSE_TURBO_LIB = false,
|
2015-06-02 05:07:17 +00:00
|
|
|
|
2020-04-14 17:36:44 +00:00
|
|
|
-- Absolute path to stardict files (override)
|
|
|
|
-- By default they're stored in data/dict under dataDir.
|
2022-09-27 23:10:50 +00:00
|
|
|
STARDICT_DATA_DIR = nil,
|
|
|
|
}
|