mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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