Bug 696326

Summary: "cannot load fallback font" exception loading any epub when using -DNOCJK
Product: MuPDF Reporter: Eric Wasylishen <ewasylishen>
Component: epubAssignee: MuPDF bugs <mupdf-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ghostscript, legimet.calc, tor.andersson
Priority: P4    
Version: master   
Hardware: PC   
OS: All   
Customer: Word Size: ---
Attachments: "hello world" epub created with pandoc

Description Eric Wasylishen 2015-11-03 19:35:11 UTC
Created attachment 12043 [details]
"hello world" epub created with pandoc

Hi, I was trying to update the document-viewer android app (https://github.com/SufficientlySecure/document-viewer) to use the mupdf 1.8 RC (revision 1548b9).

At first, I was getting the "cannot load fallback font" exception when loading any epub file I tested, even those that don't use any CJK fonts - I attached an example "hello world" epub I made with pandoc that triggered the exception. 

I noticed document-viewer was setting "LOCAL_CFLAGS += -DNOCJK" in its Core.mk, and if I remove that, the exception goes away and epub files load as expected.

So to summarize, I think that building with -DNOCJK makes the epub backend non-functional; any font will trigger the "cannot load fallback font" exception.
Comment 1 Legimet 2015-11-26 08:28:17 UTC
I am having the same issue with nPDF (https://github.com/Legimet/nPDF) after updating to MuPDF 1.8. The NOCJK flag is used since it is impractical to include the CJK fonts for such a limited device.

From my testing, EPUB and HTML files open when either the NOCJKFULL flag is used, or no flag is used. Support for these files is broken when NOCJKFONT or NOCJK is set.
Comment 2 Tor Andersson 2016-01-22 03:48:22 UTC
commit 3116d629d72ff7bf227a46601d97db8d283c0650
Author: Tor Andersson <tor.andersson@artifex.com>
Date:   Fri Jan 22 12:45:48 2016 +0100

    epub: Ignore missing fallback font for NOCJK builds.