Cleanup crereader fonts initialization.

Don't try to register the two fonts Dingbats.cff and StandardSymL.cff
with crengine because it will reject them anyway. But we cannot simply
remove these two fonts because they are used internally by mupdf to
emulate "builtin" fonts which are mandated by Adobe PDF specification to
be present in every valid implementation.
This commit is contained in:
Tigran Aivazian
2012-10-03 13:08:27 -04:00
committed by Qingping Hou
parent d60504ef83
commit d551e7fb63

View File

@@ -31,9 +31,11 @@ function CreDocument:engineInit()
-- we need to initialize the CRE font list
local fonts = Font:getFontList()
for _k, _v in ipairs(fonts) do
local ok, err = pcall(cre.registerFont, Font.fontdir..'/'.._v)
if not ok then
DEBUG(err)
if _v ~= "Dingbats.cff" and _v ~= "StandardSymL.cff" then
local ok, err = pcall(cre.registerFont, Font.fontdir..'/'.._v)
if not ok then
Debug(err)
end
end
end