Author: jeremias
Date: Mon Apr 20 10:23:56 2009
New Revision: 766644
URL: http://svn.apache.org/viewvc?rev=766644&view=rev
Log:
Disabled auto-fonts in the PS transcoders by default because of
OutOfMemoryErrors. Details in code comments.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java?rev=766644&r1=766643&r2=766644&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
Mon Apr 20 10:23:56 2009
@@ -88,6 +88,15 @@
*/
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.
*
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java?rev=766644&r1=766643&r2=766644&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java
Mon Apr 20 10:23:56 2009
@@ -135,6 +135,14 @@
}
/**
+ * 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 @@
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();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]