According to what I found here
https://pdfbox.apache.org/1.8/cookbook/workingwithfonts.html
they recommend installing so called Standard 14 Fonts.
Due to licensing requirements we need to provide substitute fonts.
Based on code in class org.apache.pdfbox.pdmodel.font.FontMapperImpl
, these are Standard 14 Fonts and their substitutes:
Courier:CourierNew,CourierNewPSMT,LiberationMono,NimbusMonL-Regu
Courier-Bold:CourierNewPS-BoldMT,CourierNew-Bold,LiberationMono-Bold,NimbusMonL-Bold
Courier-Oblique:CourierNewPS-ItalicMT,CourierNew-Italic,LiberationMono-Italic,NimbusMonL-ReguObli
Courier-BoldOblique:CourierNewPS-BoldItalicMT,CourierNew-BoldItalic,LiberationMono-BoldItalic,NimbusMonL-BoldObli
Helvetica:ArialMT,Arial,LiberationSans,NimbusSanL-Regu
Helvetica-Bold:Arial-BoldMT,Arial-Bold,LiberationSans-Bold,NimbusSanL-Bold
Helvetica-Oblique:Arial-ItalicMT,Arial-Italic,Helvetica-Italic,LiberationSans-Italic,NimbusSanL-ReguItal
Helvetica-BoldOblique:Arial-BoldItalicMT,Helvetica-BoldItalic,LiberationSans-BoldItalic,NimbusSanL-BoldItal
Times-Roman:TimesNewRomanPSMT,TimesNewRoman,TimesNewRomanPS,LiberationSerif,NimbusRomNo9L-Regu
Times-Bold:TimesNewRomanPS-BoldMT,TimesNewRomanPS-Bold,TimesNewRoman-Bold,LiberationSerif-Bold,NimbusRomNo9L-Medi
Times-Italic:TimesNewRomanPS-ItalicMT,TimesNewRomanPS-Italic,TimesNewRoman-Italic,LiberationSerif-Italic,NimbusRomNo9L-ReguItal
Times-BoldItalic:TimesNewRomanPS-BoldItalicMT,TimesNewRomanPS-BoldItalic,TimesNewRoman-BoldItalic,LiberationSerif-BoldItalic,NimbusRomNo9L-MediItal
Symbol:Symbol,SymbolMT,StandardSymL
ZapfDingbats:ZapfDingbatsITC,Dingbats,MS-Gothic
I understand that when for instance processing file that uses font Helvetica and I don't have that font installed then one of substitute fonts will be used:
ArialMT, Arial, LiberationSans, NimbusSanL-Regu.
That's clear.
What in case when I don't have font Arial (which is not one of Standard 14 Fonts) installed and I'd like LiberationSans to be used when processing file with Arial. Is there a way to configure such mapping?
One more thing: in version 1.8.13 I saw in class: org.apache.pdfbox.pdmodel.font.FontManager
resource file is loaded: org/apache/pdfbox/resources/FontMapping.properties
which could be used to provide such mappings.
In version 2.x I don't see any posibility to do this. I wonder why it was removed...