aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2009-04-20 10:23:56 +0000
committerJeremias Maerki <jeremias@apache.org>2009-04-20 10:23:56 +0000
commit6b14d502651d693ec516d87b60f876d7c594a12a (patch)
tree834e133de7da4a41043f91e8dcaa6199d5a4bc43 /src/java
parenteea5b25ec81856d7e47f18d54f146f881eb8c72c (diff)
downloadxmlgraphics-fop-6b14d502651d693ec516d87b60f876d7c594a12a.tar.gz
xmlgraphics-fop-6b14d502651d693ec516d87b60f876d7c594a12a.zip
Disabled auto-fonts in the PS transcoders by default because of OutOfMemoryErrors. Details in code comments.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@766644 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java9
-rw-r--r--src/java/org/apache/fop/svg/AbstractFOPTranscoder.java10
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();
}