Suppose I'm creating a PDF file using Apache FOP. All the characters in the PDF should be Times New Roman Italic
. Since there are no such font in my system, Apache FOP will try to find the font in /data/fonts, which is set by fop.xconf.
<directory>/data/fonts</directory>
However, there's only one file in /data/fonts, which is Times New Roman Regular.ttf
. Yes, no Times New Roman Italic.ttf
and no Times New Roman Bold.ttf
.
ls /data/fonts
'Times New Roman Regular.ttf'
In this case, Apache FOP reported that it couldn't find Times New Roman Italic
font, and it fell back to the default font, which was not Times New Roman
and not italic either.
I can solve the problem by putting Times New Roman Italic.ttf
in /data/fonts, but what if I don't have a specific italic/bold version of that font? AFAIK some fonts don't have specific bold/italic versions at all. Is it possible for Apache FOP to create the italic/bold style from the regular font automatically, even if the result is not as good as the specific italic/bold font?