From 8107d84e9ebb47e2b8450c1add3922f56b9bb4c4 Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Wed, 3 Oct 2012 17:29:09 +0100 Subject: [PATCH] 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. --- crereader.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crereader.lua b/crereader.lua index 52a8587ff..f2db04fba 100644 --- a/crereader.lua +++ b/crereader.lua @@ -24,9 +24,11 @@ function CREReader:init() -- 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