Algerian is installed on my computer, and it is available with a command "fc-list":
- Code: Select all
$ fc-list | grep Algerian
/home/lupin/.fonts/ALGER.TTF: Algerian:style=Regular,normal,Standard,Normaali,Normale,Standaard
/usr/local/lib/X11/fonts/lupinfonts/ALGER.TTF: Algerian:style=Regular,normal,Standard,Normaali,Normale,Standaard
I've tried to use fop config with autodetect option:
- Code: Select all
foSettings.setApacheFopConfiguration(File.read("fop.xconf")) # File.read("fop.xconf") returns a string containing xml of fop config
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.1">
<renderers>
<renderer mime="application/pdf">
<fonts>
<directory>/Library/Fonts</directory>
<auto-detect/>
</fonts>
</renderer>
</renderers>
</fop>
And by specifying exact path in config:
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.1">
<renderers>
<renderer mime="application/pdf">
<font embed-url="file:/home/dreamfall/.fonts/ALGER.TTF">
<font-triplet name="Algerian" style="normal" weight="normal"/>
</font>
</renderer>
</renderers>
</fop>
But I still get a bunch of warnings.
- Code: Select all
[Ruby-0-Fiber-9] WARN org.docx4j.convert.out.fo.renderers.FORendererApacheFOP - Can't set up FOP svn; org.apache.fop.apps.FopConfParser
Oct 22, 2014 8:23:14 PM org.apache.fop.apps.FOUserAgent processEvent
WARNING: Font "Calibri,normal,400" not found. Substituting with "any,normal,400".
[Ruby-0-Fiber-9] WARN org.docx4j.openpackaging.parts.ThemePart - Empty typeface in font for MAJOR_EAST_ASIA
[Ruby-0-Fiber-9] INFO org.docx4j.fonts.RunFontSelector - theme font for lang org.docx4j.wml.CTLanguage@8facabd is null, but we don't have that
[Ruby-0-Fiber-9] WARN org.docx4j.fonts.RunFontSelector - Font 'Cambria' is not mapped to a physical font.
[Ruby-0-Fiber-9] WARN org.docx4j.fonts.RunFontSelector - Font 'Algerian' is not mapped to a physical font.
[Ruby-0-Fiber-9] WARN org.docx4j.fonts.RunFontSelector - Font 'Algerian' is not mapped to a physical font.
[Ruby-0-Fiber-9] WARN org.docx4j.fonts.RunFontSelector - Font 'Algerian' is not mapped to a physical font.
[Ruby-0-Fiber-9] WARN org.docx4j.fonts.RunFontSelector - Font 'Algerian' is not mapped to a physical font.
<fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Symbol"></fo:inline>
<fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Symbol"></fo:inline>
<fo:inline xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Symbol"></fo:inline>
[Ruby-0-Fiber-9] WARN org.docx4j.convert.out.fo.renderers.FORendererApacheFOP - Can't set up FOP svn; org.apache.fop.apps.FopConfParser
Oct 22, 2014 8:23:15 PM org.apache.fop.apps.FOUserAgent processEvent
WARNING: Font "Symbol,normal,700" not found. Substituting with "Symbol,normal,400".
Oct 22, 2014 8:23:15 PM org.apache.fop.apps.FOUserAgent processEvent
WARNING: Font "ZapfDingbats,normal,700" not found. Substituting with "ZapfDingbats,normal,400".
Oct 22, 2014 8:23:15 PM org.apache.fop.apps.FOUserAgent processEvent
WARNING: Font "Calibri,normal,700" not found. Substituting with "Calibri,normal,400".
Oct 22, 2014 8:23:15 PM org.apache.fop.apps.FOUserAgent processEvent
I'm sure, I'm doing something wrong, but I am not experienced with Java enough to find a solution. Please give some advice.