From d551e7fb637799b2347cb7c0256ce72a8f8ab13a Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Wed, 3 Oct 2012 13:08:27 -0400 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. --- frontend/document/credocument.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/document/credocument.lua b/frontend/document/credocument.lua index 2828ad1d4..1697fc0e8 100644 --- a/frontend/document/credocument.lua +++ b/frontend/document/credocument.lua @@ -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