]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Metrics need to be added before the font properties to avoid NPEs on font replacement.
authorJeremias Maerki <jeremias@apache.org>
Thu, 30 Sep 2010 09:51:02 +0000 (09:51 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 30 Sep 2010 09:51:02 +0000 (09:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1002980 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/afp/fonts/AFPFontCollection.java

index 66b3f556488090ff8e5a1902bf3c67363b56a239..b7db6a74e2ff151f884e28d99f69e3682fd28a90 100644 (file)
@@ -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++;
                 }
             }