You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Hitoshi Ozawa <Oz...@ogis-ri.co.jp> on 2012/01/26 07:11:27 UTC

Font not found error

I'm trying to specify Japanese fonts to use with Forrest 0.9 but keep
getting the following error:
WARN - Font 'IPAGothic,normal,400' not found. Substituting with
'any,normal,400'.
WARN - Font 'IPAGothic,normal,700' not found. Substituting with
'any,normal,700'.
WARN - Font 'IPAGothic,italic,400' not found. Substituting with
'any,italic,400'.

I've created the following forrest.properties.xml file:
<?xml version='1.0'?>
<properties>
<property name="output.pdf.fontFamily.serif" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.sansSerif" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.monospace" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.arial" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.TimesNewRoman" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.Courier" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.arialMT" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.arial-BoldMT" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.arial-ItalicMT" value="IPAPGothic"/>
<property name="output.pdf.fontFamily.TimesNewRomanPSMT"
value="IPAPGothic"/>
</properties>

and the following config.xml file:
<fop version="1.0">
<renderers>
<renderer mime="application/pdf">
<fonts>
<fonts>
<font metrics-file="ipapgothic.xml" kerning="yes"
embed-uri="file:///D:/Download/fonts/IPAGTTC00303/ipag.ttc">
<font-triplet name="IPAPGothic" style="normal" weight="normal"/>
<font-triplet name="IPAPGothic" style="normal" weight="bold"/>
<font-triplet name="IPAPGothic" style="normal" weight="400"/>
<font-triplet name="IPAPGothic" style="normal" weight="700"/>
<font-triplet name="IPAPGothic" style="italic" weight="normal"/>
<font-triplet name="IPAPGothic" style="italic" weight="bold"/>
<font-triplet name="IPAPGothic" style="italic" weight="400"/>
<font-triplet name="IPAPGothic" style="italic" weight="700"/>
</font>
</fonts>
</fonts>
</renderer>
</renderers>
</fop>

I do get a pdf file but because the font is wrong Japanese characters
are being replaced with "#".
Greatly appreciate any assistance.