aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-08-13 07:52:21 +0000
committerKeiron Liddle <keiron@apache.org>2001-08-13 07:52:21 +0000
commit9b7fb63672f4a8ecc9088f8bbad504924851ba2e (patch)
tree95c7f05e2e623d76b7dc507db111fc4ea972f632
parent97e96c821c758fcace65d58ddeda0d99f7d55783 (diff)
downloadxmlgraphics-fop-9b7fb63672f4a8ecc9088f8bbad504924851ba2e.tar.gz
xmlgraphics-fop-9b7fb63672f4a8ecc9088f8bbad504924851ba2e.zip
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 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194413 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/org/apache/fop/render/pdf/PDFRenderer.java3
-rw-r--r--src/org/apache/fop/render/pdf/fonts/LazyFont.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java
index ff59db46e..01dacee24 100644
--- a/src/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/org/apache/fop/render/pdf/PDFRenderer.java
@@ -153,6 +153,7 @@ public class PDFRenderer extends PrintRenderer {
public void stopRenderer(OutputStream stream)
throws IOException {
+ FontSetup.addToResources(this.pdfDoc, fontInfo);
pdfDoc.outputTrailer(stream);
}
@@ -684,7 +685,7 @@ public class PDFRenderer extends PrintRenderer {
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);
diff --git a/src/org/apache/fop/render/pdf/fonts/LazyFont.java b/src/org/apache/fop/render/pdf/fonts/LazyFont.java
index 80faae2de..e9fc2caee 100644
--- a/src/org/apache/fop/render/pdf/fonts/LazyFont.java
+++ b/src/org/apache/fop/render/pdf/fonts/LazyFont.java
@@ -33,6 +33,7 @@ public class LazyFont extends Font implements FontDescriptor {
private void load(){
if(! isMetricsLoaded){
+ isMetricsLoaded = true;
try{
FontReader reader = new FontReader(metricsFileName);
reader.useKerning(useKerning);
@@ -41,7 +42,6 @@ public class LazyFont extends Font implements FontDescriptor {
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 "