Merge pull request #834 from chrox/fix_fallback

fix Droid Sans Fallback not registered to crengine
This commit is contained in:
Qingping Hou
2014-08-23 21:18:37 -07:00
2 changed files with 3 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ local CreDocument = Document:new{
line_space_percent = 100,
default_font = G_reader_settings:readSetting("cre_font") or "Noto Serif",
header_font = G_reader_settings:readSetting("header_font") or "Noto Sans",
fallback_font = G_reader_settings:readSetting("fallback_font") or "Droid Sans Fallback",
fallback_font = G_reader_settings:readSetting("fallback_font") or "Droid Sans Fallback H",
default_css = "./data/cr3.css",
options = CreOptions,
}

View File

@@ -83,7 +83,8 @@ function Font:_readList(target, dir, effective_dir)
self:_readList(target, dir.."/"..f, effective_dir..f.."/")
else
local file_type = string.lower(string.match(f, ".+%.([^.]+)") or "")
if file_type == "ttf" or file_type == "cff" or file_type == "otf" then
if file_type == "ttf" or file_type == "ttc"
or file_type == "cff" or file_type == "otf" then
table.insert(target, effective_dir..f)
end
end