xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r908410 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop: cli/IFInputHandler.java render/ps/PSPainter.java
Date Wed, 10 Feb 2010 09:31:44 GMT
Author: jeremias
Date: Wed Feb 10 09:31:42 2010
New Revision: 908410

URL: http://svn.apache.org/viewvc?rev=908410&view=rev
Log:
Better error message if a font is missing when generating PS from IF.
Tie font configuration into -ifin parameter on the command-line.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/IFInputHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSPainter.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/IFInputHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/IFInputHandler.java?rev=908410&r1=908409&r2=908410&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/IFInputHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/IFInputHandler.java Wed Feb 10 09:31:42
2010
@@ -29,10 +29,10 @@
 
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
 import org.apache.fop.render.intermediate.IFException;
 import org.apache.fop.render.intermediate.IFParser;
+import org.apache.fop.render.intermediate.IFUtil;
 
 /**
  * InputHandler for the intermediate format XML as input.
@@ -66,7 +66,7 @@
                     userAgent, outputFormat);
         try {
             documentHandler.setResult(new StreamResult(out));
-            documentHandler.setDefaultFontInfo(new FontInfo());
+            IFUtil.setupFonts(documentHandler);
 
             //Create IF parser
             IFParser parser = new IFParser();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSPainter.java?rev=908410&r1=908409&r2=908410&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSPainter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSPainter.java Wed Feb 10 09:31:42
2010
@@ -349,6 +349,9 @@
             //TODO Ignored: state.getFontVariant()
             //TODO Opportunity for font caching if font state is more heavily used
             String fontKey = getFontInfo().getInternalFontKey(triplet);
+            if (fontKey == null) {
+                throw new IFException("Font not available: " + triplet, null);
+            }
             int sizeMillipoints = state.getFontSize();
 
             // This assumes that *all* CIDFonts use a /ToUnicode mapping



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message