Author: jeremias
Date: Thu Sep 30 09:51:02 2010
New Revision: 1002980
URL: http://svn.apache.org/viewvc?rev=1002980&view=rev
Log:
Metrics need to be added before the font properties to avoid NPEs on font
replacement.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java?rev=1002980&r1=1002979&r2=1002980&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
Thu Sep 30 09:51:02 2010
@@ -61,9 +61,9 @@ public class AFPFontCollection implement
List/*<FontTriplet>*/ tripletList =
afpFontInfo.getFontTriplets();
for (Iterator it2 = tripletList.iterator(); it2.hasNext();) {
FontTriplet triplet = (FontTriplet)it2.next();
+ fontInfo.addMetrics("F" + num, afpFont);
fontInfo.addFontProperties("F" + num,
triplet.getName(), triplet.getStyle(),
triplet.getWeight());
- fontInfo.addMetrics("F" + num, afpFont);
num++;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]