keiron      01/08/13 00:52:21

  Modified:    src/org/apache/fop/render/pdf PDFRenderer.java
               src/org/apache/fop/render/pdf/fonts LazyFont.java
  Log:
  pdf renderer now adds the fonts at the end of all pages rather than after each page
  lazy font will set loaded to true after first attempt rather than keep trying if it 
fails
  
  Revision  Changes    Path
  1.81      +3 -2      xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java
  
  Index: PDFRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- PDFRenderer.java  2001/08/09 13:51:55     1.80
  +++ PDFRenderer.java  2001/08/13 07:52:21     1.81
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFRenderer.java,v 1.80 2001/08/09 13:51:55 keiron Exp $
  + * $Id: PDFRenderer.java,v 1.81 2001/08/13 07:52:21 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -153,6 +153,7 @@
   
       public void stopRenderer(OutputStream stream)
       throws IOException {
  +        FontSetup.addToResources(this.pdfDoc, fontInfo);
           pdfDoc.outputTrailer(stream);
       }
   
  @@ -684,7 +685,7 @@
           this.pdfDoc.setIDReferences(idReferences);
           this.renderPage(page);
   
  -        FontSetup.addToResources(this.pdfDoc, fontInfo);
  +        //FontSetup.addToResources(this.pdfDoc, fontInfo);
   
           // TODO: this needs to be implemented
           renderRootExtensions(page);
  
  
  
  1.2       +2 -2      xml-fop/src/org/apache/fop/render/pdf/fonts/LazyFont.java
  
  Index: LazyFont.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/fonts/LazyFont.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LazyFont.java     2001/08/06 09:43:08     1.1
  +++ LazyFont.java     2001/08/13 07:52:21     1.2
  @@ -1,5 +1,5 @@
   /*
  - * $Id: LazyFont.java,v 1.1 2001/08/06 09:43:08 keiron Exp $
  + * $Id: LazyFont.java,v 1.2 2001/08/13 07:52:21 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -33,6 +33,7 @@
       
       private void load(){
           if(! isMetricsLoaded){
  +            isMetricsLoaded = true;
               try{
                   FontReader reader = new FontReader(metricsFileName);
                   reader.useKerning(useKerning);
  @@ -41,7 +42,6 @@
                   if(realFont instanceof FontDescriptor){
                       realFontDescriptor = (FontDescriptor) realFont;
                   }
  -                isMetricsLoaded = true;
                   // System.out.println("Metrics " + metricsFileName + " loaded.");
               } catch (Exception ex) {
                   MessageHandler.error("Failed to read font metrics file "
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to