opendocument-app / pdf2htmlEX-Android

pdf2htmlEX library port for Android - Convert PDF to HTML without losing text or format
GNU General Public License v3.0
30 stars 11 forks source link

Download missing fonts at runtime #13

Open ViliusSutkus89 opened 4 years ago

ViliusSutkus89 commented 4 years ago

Continuation of Fontconfig work started on #8.

Android devices have some fonts installed. List varies.

PDF expects a list of 14 fonts:

Symbol and Zapf Dingbats were not found on tested devices, but they are quite small (both totalling under 100kb), so were included in this library in commit 8dd1207ee7600cf184ebb20220bb4ce5b2e5c53d

Most fonts have (metrically compatible ??) replacement fonts available on the device. Keyword being "most", Courier (monospace) only has base verson, but not bold or oblique (italic ??).

TODO:

TomTasche commented 4 years ago

Is this something we should log and get fixed upstream?

ViliusSutkus89 commented 4 years ago

I doubt it. If you lack fonts on your desktop, it means your desktop is broken and you as the end user can fix it: install fonts package, adjust settings, et cetera. Android end users have no such options. Device gets shipped with some fonts and if the app wants to use different fonts it has to either bundle them with the app or download them at runtime.