probably an issue with font precedence... attached is an example that works with trunk.
On 10/29/13 11:39 AM, Mauro Giacomini wrote:
Hello all,I'm working on a java application with apache-fop to transform a custom xml to a pdf (with a xsl of course). I also write a xml configuration file, but I am not able to do a font substitutionThis is the snippets of conf file <directory>my_custom_font_directory</directory> ... <substitutions> <substitution><from font-family="PrestigeEliteStd" font-weight="700..900" font-style="normal"/><to font-family="Courier" font-weight="700" font-style="normal"/> </substitution> </substitutions> In the output I see this line:LoggingEventListener: 94 - Font "PrestigeEliteStd,normal,900" not found. Substituting with "PrestigeEliteStd,normal,400".Seem that the configuration is not accessed What can I do? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
<fop version="1.0">
<fonts>
<substitutions>
<substitution>
<from font-family="Arial" font-weight="700..900"/>
<to font-family="Courier" font-weight="700"/>
</substitution>
</substitutions>
</fonts>
<renderers>
<renderer mime="application/pdf">
<fonts>
<font kerning="yes" embed-url="/Library/Fonts/Arial.ttf"
embedding-mode="subset">
<font-triplet name="Arial" style="normal" weight="normal"/>
</font>
<font kerning="yes" embed-url="/Library/Fonts/Courier New Bold.ttf"
embedding-mode="subset">
<font-triplet name="Courier" style="normal" weight="bold"/>
</font>
<font kerning="yes" embed-url="/Library/Fonts/Courier New.ttf"
embedding-mode="subset">
<font-triplet name="Courier" style="normal" weight="normal"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
<?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master margin="2cm" page-width="21.0cm" page-height="29.7cm" master-name="A4-portrait"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="A4-portrait"> <fo:flow flow-name="xsl-region-body"> <fo:block font-family="Arial" font-weight="bold">Hello FOP!</fo:block> <fo:block font-family="Arial" font-weight="normal">Hello FOP!</fo:block> <fo:block font-family="Courier" font-weight="bold">Hello FOP!</fo:block> <fo:block font-family="Courier" font-weight="normal">Hello FOP!</fo:block> </fo:flow> </fo:page-sequence> </fo:root>
test.pdf
Description: Adobe PDF document
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
