add FONTDIR env variable
to support custom font directory for EPUB documents Now Koreader could find fonts in the "fonts" directory in the USB root directory of kindle, Kobo and PocketBook devices, thus no need to copy fonts to "koreader/fonts" directory.
This commit is contained in:
1 parent
dfa30f5524
commit
077517be0b
5 files changed
+21
-8
No files matched your search
@@ -58,8 +58,8 @@ function CreDocument:engineInit()
|
||||
-- we need to initialize the CRE font list
|
||||
local fonts = Font:getFontList()
|
||||
for _k, _v in ipairs(fonts) do
|
||||
if _v:sub(1, 4) ~= "urw/" then
|
||||
local ok, err = pcall(cre.registerFont, Font.fontdir..'/'.._v)
|
||||
if not _v:find("/urw/") then
|
||||
local ok, err = pcall(cre.registerFont, _v)
|
||||
if not ok then
|
||||
DEBUG(err)
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user