aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2010-09-30 09:51:02 +0000
committerJeremias Maerki <jeremias@apache.org>2010-09-30 09:51:02 +0000
commit9f74aeeef633b0f57fc590c6e985b5bd333e8ecc (patch)
tree45ee09ac9d677bdaee0f66c6cfb1ebbd0ea6d161 /src
parentda7bda6577522eb455bacf3b0e6703462eecd72b (diff)
downloadxmlgraphics-fop-9f74aeeef633b0f57fc590c6e985b5bd333e8ecc.tar.gz
xmlgraphics-fop-9f74aeeef633b0f57fc590c6e985b5bd333e8ecc.zip
Metrics need to be added before the font properties to avoid NPEs on font replacement.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1002980 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/afp/fonts/AFPFontCollection.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java b/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
index 66b3f5564..b7db6a74e 100644
--- a/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
+++ b/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
@@ -61,9 +61,9 @@ public class AFPFontCollection implements FontCollection {
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++;
}
}