Reputation: 1107
We migrated to PDFBox 2.0.1 from 1.8 and have some issues with fonts. We try not to embed them and trying to use default fonts if possible.
That worked well in 1.8 but in 2.0.1 we get some errors when running on Amazon Linux - e.g.
As everything is working OK on my Mac, the problem cause is that whatever fonts are not available on Amazon Linux, our target environment where the PDFs are to be created.
a) It seems to me that the solution is hopefully just to install some Linux package with the fonts ... which one? Candidates are (https://aws.amazon.com/amazon-linux-ami/2016.03-packages/)
and if installed, do I have to map them .. and how?
b) If there is no package, where would I find instructions on how to install the right fonts and how to map them (and where to get them from legally)
Upvotes: 2
Views: 1637
Reputation: 2451
I doubt you can use default PDF fonts under Linux with complex text, the PS/PDF fonts available are severely limited in unicode coverage. No effort was made to revive them before TEX Gyre. And TEx Gyre is usually not packaged due to early licensing mistakes. (That should be fixed now, but early stages are critical for adoption).
You can get by with lots of complex text with Dejavu and Stix but they do not and should not be automatically substituted to default PS/PDF fonts. The metrics ie the size and proportions of letters are different, once the text size has been computed with those fonts replacing them with default fonts breaks formatting some. Liberation is already borderline, it mimicks MS fonts not PS/PDF ones.
If you give up on PS/PDF default fonts, to get maximal unicode coverage with pretty fonts you should install all the font packages marked as default in Fedora, in the fonts group (Fedora → RHEL → Centos → AMI).
Upvotes: 1