New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APK is markedly larger #88
Comments
No, the font pack has not been included into the main package. The increase in size is due to the new MuPdf build process. If you inspect the apk, the *.so libraries alone account for the biggest part of the package. The MuPdf build process has been copied from the MuPdf for Android app, hence the *.so files in their APKs are just as big. But they split the APK according to the supported architectures, so that they don't have four different *.so in one APK (for armeabi, armeabi-v7a, mips, x86). I confirm your bug report, since an increase from 9.7 MB (v2.5) up to 23.7 MB (v2.7) is surely remarkable. But I actually don't know how to cope with it. Of course, the easiest solution seems to be having separate packages for the different arches (like we temporarily had with v2.6). But I don't know how to do this. Probably also this might help: https://blog.algolia.com/android-ndk-how-to-reduce-libs-size/ |
Well, when I access the MuPDF website, I got source tarball from their download link, then I found several large font files inside. I think these files may cause the problem, maybe some of them can be split from their source code and move to DV Font Pack. |
No, the APK does not contain any part of the MuPdf source tarball - especially no fonts or other resources. Instead, the increase is entirely due to a larger *.so file. You can simply check this yourself by comparing the file size of v2.6 (6.7 MB, containing only armeabi-v7a) and v2.6.1 (22.7 MB, containing armeabi, armeabi-v7a, mips, x86, but same code base apart from that). |
Had the very same issue. Fortunately splitting EDIT: You wrote you already build the
in |
@consp1racy Thank you very much! The It seems to me like it's more elegant switching to splitted |
No problem at all! You can always make another flavor specifically for Asian market, which will have native libraries with CJK fonts. Where are the days of a single .apk ... :D |
Hello everyone, Sorry for asking this question even after the thread has been dormant for some time. I am also facing the problem of size with the lib and even after adding LOCAL_CFLAGS += -DNOCJK it is still quite big. May be am adding that line at the wrong point of Core.mk...I just wanted to ask where in Core.mk should I add that line and at what point of building mupdf from source. |
@lawrence615 hey, here's the Core.mk for document-viewer: https://github.com/SufficientlySecure/document-viewer/blob/master/document-viewer/jni/mupdf/Core.mk Also keep in mind that even with no CJK fonts, there are still about 800KB of fonts that need to be embedded in mupdf (the PDF core fonts). |
Was this the result of the font pack being included? Storage isn't cheap.
The text was updated successfully, but these errors were encountered: