diff options
-rw-r--r-- | src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java | 9 | ||||
-rw-r--r-- | src/java/org/apache/fop/svg/AbstractFOPTranscoder.java | 10 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java b/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java index d6f5fe2ed..f991cdf54 100644 --- a/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java +++ b/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java @@ -88,6 +88,15 @@ public abstract class AbstractPSTranscoder extends AbstractFOPTranscoder { */ protected abstract AbstractPSDocumentGraphics2D createDocumentGraphics2D(); + /** {@inheritDoc} */ + protected boolean getAutoFontsDefault() { + //Currently set to false because auto-fonts requires a lot of memory in the PostScript + //case: All fonts (even the unsupported TTF fonts) need to be loaded and TrueType loading + //is currently very memory-intensive. At default JVM memory settings, this woudl result + //in OutOfMemoryErrors otherwise. + return false; + } + /** * Transcodes the specified Document as an image in the specified output. * diff --git a/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java b/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java index caae32cf0..551da21df 100644 --- a/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java +++ b/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java @@ -135,6 +135,14 @@ public abstract class AbstractFOPTranscoder extends SVGAbstractTranscoder { } /** + * Returns the default value for the KEY_AUTO_FONTS value. + * @return the default value + */ + protected boolean getAutoFontsDefault() { + return true; + } + + /** * Returns the effective configuration for the transcoder. * @return the effective configuration */ @@ -142,7 +150,7 @@ public abstract class AbstractFOPTranscoder extends SVGAbstractTranscoder { Configuration effCfg = this.cfg; if (effCfg == null) { //By default, enable font auto-detection if no cfg is given - boolean autoFonts = true; + boolean autoFonts = getAutoFontsDefault(); if (hints.containsKey(KEY_AUTO_FONTS)) { autoFonts = ((Boolean)hints.get(KEY_AUTO_FONTS)).booleanValue(); } |