Bug 696326 - "cannot load fallback font" exception loading any epub when using -DNOCJK
Summary: "cannot load fallback font" exception loading any epub when using -DNOCJK
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: epub (show other bugs)
Version: master
Hardware: PC All
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-03 19:35 UTC by Eric Wasylishen
Modified: 2016-01-22 03:48 UTC (History)
3 users (show)

See Also:
Customer:
Word Size: ---


Attachments
"hello world" epub created with pandoc (3.22 KB, application/epub+zip)
2015-11-03 19:35 UTC, Eric Wasylishen
Details

Note You need to log in before you can comment on or make changes to this bug.
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.