From 379d6216a06dac42ba2da34b30181ae314995d8a Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Tue, 12 Jun 2012 12:10:44 +0800 Subject: [PATCH] read reader settings in reader.lua --- reader.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) mode change 100644 => 100755 reader.lua diff --git a/reader.lua b/reader.lua old mode 100644 new mode 100755 index 06dc40722..53593b115 --- a/reader.lua +++ b/reader.lua @@ -100,6 +100,15 @@ if optarg["G"] ~= nil then globalgamma = optarg["G"] end +-- set up reader's setting: font +G_reader_settings = DocSettings:open(".reader") +fontmap = G_reader_settings:readSetting("fontmap") +DEBUG(fontmap) +if fontmap ~= nil then + Font.fontmap = fontmap +end +local last_file = G_reader_settings:readSetting("lastfile") + Screen:updateRotationMode() Screen.native_rotation_mode = Screen.cur_rotation_mode @@ -113,7 +122,6 @@ if ARGV[optind] then end UIManager:run() elseif last_file and lfs.attributes(last_file, "mode") == "file" then - --@TODO get last_file from settings 12.06 2012 (houqp) showReader(last_file, optarg["p"]) UIManager:run() else