Le lundi 08 novembre 2010 17.51:57, Laurent Medioni a écrit :
> Try to get DEBUG logs from org.apache.fop.fonts using log4j, I am not sure
> you can get them from the Cocoon logs...

I'm afraid it's a little difficult for me. I'm a Cocoon user, having some 
practice with XSLT, SQL queries and XSL-FO stylesheets, but not a Java 
developer. I have absolute no idea how I could parameter log4j for a more 
comprehensive output.

For now, after having replaced the native logkit system by log4j, using the 
proposed default log4j.xconf config file, I get a (very) verbose log file, with 
some interesting lines I hadn't in my precedent cocoon.log.

These lines are:
cocoon/log4j.log:http-8080-1 WARN  fonts.FontInfo - Font 
'DejaVuSerif,normal,400' not found. Substituting with 'any,normal,400'.

cocoon/log4j.log:http-8080-1 WARN  fonts.FontInfo - Font 
'DejaVuSerif,normal,700' not found. Substituting with 'any,normal,700'.

But the (about 10 megas) log4j.log doesn't tell me why (or I don't understand 
where it does). 

I'm not even sure Cocoon reads the font metric files or my font-config.xml 
(there are no mention of those files in the log).

> I remember solving my issue using these logs because it showed that I
> needed to map "SansSerif" to my nice new Arial Unicode font... Here is the
> font declaration in fop.xconf:
> <font metrics-url="file:///X:/somewhere/arial_uni.xml" kerning="yes"
> embed-url="file:///X:/somewhere/ARIAL_UNI.TTF"> <font-triplet name="Arial"
> style="normal" weight="normal"/>
>       <font-triplet name="Arial" style="normal" weight="bold"/>
>       <font-triplet name="Arial" style="italic" weight="normal"/>
>       <font-triplet name="Arial" style="italic" weight="bold"/>
>       <font-triplet name="Arial Unicode MS" style="normal" weight="normal"/>
>       <font-triplet name="Arial Unicode MS" style="normal" weight="bold"/>
>       <font-triplet name="Arial Unicode MS" style="italic" weight="normal"/>
>       <font-triplet name="Arial Unicode MS" style="italic" weight="bold"/>
>       <font-triplet name="SansSerif" style="normal" weight="normal"/>
>       <font-triplet name="SansSerif" style="normal" weight="bold"/>
>       <font-triplet name="SansSerif" style="italic" weight="normal"/>
>       <font-triplet name="SansSerif" style="italic" weight="bold"/>
> </font>
> I do not know what your document content is but you should try to match all
> the possible font triplets from your document... Laurent

Here is my font-config.xml. It is a little different from yours, but I believe 
it conforms to the documentation I've found on 
"http://cocoon.apache.org/2.1/userdocs/pdf-serializer.html";. 

I've made it for more fonts than I'm really using (DejaVuSerif and DejaVuSerif 
bold would be enough for my actual document, but I can't exclude I'll be using 
italic or the sans serif varaint in the future).

<configuration>
  <fonts>
    <font metrics-file="DejaVuSerif.xml" 
          kerning="yes" embed-file="/usr/share/fonts/truetype/DejaVuSerif.ttf">
      <font-triplet name="DejaVuSerif" style="normal" weight="normal"/>
    </font>
    <font metrics-file="DejaVuSerifItalic.xml" 
          kerning="yes" embed-file="/usr/share/fonts/truetype/DejaVuSerif-
Italic.ttf">
      <font-triplet name="DejaVuSerif" style="italic" weight="normal"/>
    </font>
    <font metrics-file="DejaVuSerifBold.xml" 
          kerning="yes" embed-file="/usr/share/fonts/truetype/DejaVuSerif-
Bold.ttf">
      <font-triplet name="DejaVuSerif" style="normal" weight="bold"/>
    </font>
    <font metrics-file="DejaVuSerifBoldItalic.xml" 
          kerning="yes" embed-file="/usr/share/fonts/truetype/DejaVuSerif-
BoldItalic.ttf">
      <font-triplet name="DejaVuSerif" style="italic" weight="bold"/>
    </font>
    <font metrics-file="DejaVuSans.xml" 
          kerning="yes" embed-file="/usr/share/fonts/truetype/DejaVuSans.ttf">
      <font-triplet name="DejaVuSans" style="normal" weight="normal"/>
    </font>
    <font metrics-file="DejaVuSansOblique.xml" 
          kerning="yes" embed-file="/usr/share/fonts/truetype/DejaVuSans-
Oblique.ttf">
      <font-triplet name="DejaVuSans" style="italic" weight="normal"/>
    </font>
    <font metrics-file="DejaVuSansBold.xml" 
          kerning="yes" embed-file="/usr/share/fonts/truetype/DejaVuSans-
Bold.ttf">
      <font-triplet name="DejaVuSans" style="normal" weight="bold"/>
    </font>
    <font metrics-file="DejaVuSansBoldItalic.xml" 
          kerning="yes" embed-file="/usr/share/fonts/truetype/DejaVuSans-
BoldItalic.ttf">
      <font-triplet name="DejaVuSans" style="italic" weight="bold"/>
    </font>
  </fonts>
</configuration>

Anyhow, thank you for your help. If you have some hints further, I take them 
gratefully.

Philippe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org

Reply via email to