Index: src/main/java/org/apache/fontbox/cff/AFMFormatter.java
===================================================================
--- src/main/java/org/apache/fontbox/cff/AFMFormatter.java	(revision 922527)
+++ src/main/java/org/apache/fontbox/cff/AFMFormatter.java	(working copy)
@@ -61,6 +61,7 @@
     private static void printFontMetrics(CFFFont font, DataOutput output)
             throws IOException
     {
+        List<CharMetric> metrics = renderFont(font);
         output.println("StartFontMetrics 2.0");
         output.println("FontName " + font.getName());
         output.println("FullName " + font.getProperty("FullName"));
@@ -71,11 +72,11 @@
         {
             output.println("EncodingScheme FontSpecific");
         }
-        List<Number> fontBBox = (List<Number>) font.getProperty("FontBBox");
-        output.println("FontBBox " + fontBBox.get(0) + " " + fontBBox.get(1)
-                + " " + fontBBox.get(2) + " " + fontBBox.get(3));
+        Rectangle2D bounds = getBounds(metrics);
+        output.println("FontBBox " + (int)bounds.getX() + " " + (int)bounds.getY()
+                + " " + (int)bounds.getMaxX() + " " + (int)bounds.getMaxY());
         printDirectionMetrics(font, output);
-        printCharMetrics(font, output);
+        printCharMetrics(font, metrics, output);
         output.println("EndFontMetrics");
     }
 
@@ -90,18 +91,9 @@
         output.println("IsFixedPitch " + font.getProperty("isFixedPitch"));
     }
 
-    private static void printCharMetrics(CFFFont font, DataOutput output)
+    private static void printCharMetrics(CFFFont font, List<CharMetric> metrics, DataOutput output)
             throws IOException
     {
-        List<CharMetric> metrics;
-        try
-        {
-            metrics = renderFont(font);
-        } 
-        catch (IOException ioe)
-        {
-            return;
-        }
         output.println("StartCharMetrics " + metrics.size());
         Collections.sort(metrics);
         for (CharMetric metric : metrics)
@@ -139,6 +131,24 @@
         return metrics;
     }
 
+    private static Rectangle2D getBounds(List<CharMetric> metrics)
+    {
+        Rectangle2D bounds = null;
+        for(CharMetric metric : metrics)
+        {
+            if(bounds == null)
+            {
+                bounds = new Rectangle2D.Double();
+                bounds.setFrame(metric.bounds);
+            }
+            else
+            {
+                Rectangle2D.union(bounds, metric.bounds, bounds);
+            }
+        }
+        return bounds;
+    }
+
     /**
      * This class represents the metric of one single character. 
      *
Index: src/main/java/org/apache/fontbox/cff/Type1FontFormatter.java
===================================================================
--- src/main/java/org/apache/fontbox/cff/Type1FontFormatter.java	(revision 922527)
+++ src/main/java/org/apache/fontbox/cff/Type1FontFormatter.java	(working copy)
@@ -17,7 +17,11 @@
 package org.apache.fontbox.cff;
 
 import java.io.IOException;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.text.NumberFormat;
 import java.util.Collection;
+import java.util.Locale;
 
 /**
  * This class represents a formatter for a given Type1 font.  
@@ -94,8 +98,9 @@
         output.println("/FontName /" + font.getName() + " def");
         output.println("/PaintType " + font.getProperty("PaintType") + " def");
         output.println("/FontType 1 def");
+        NumberFormat matrixFormat = new DecimalFormat("0.########", DecimalFormatSymbols.getInstance(Locale.US));
         output.println("/FontMatrix "
-                + formatArray(font.getProperty("FontMatrix"), false)
+                + formatArray(font.getProperty("FontMatrix"), matrixFormat, false)
                 + " readonly def");
         output.println("/FontBBox "
                 + formatArray(font.getProperty("FontBBox"), false)
@@ -193,6 +198,11 @@
 
     private static String formatArray(Object object, boolean executable)
     {
+        return formatArray(object, null, executable);
+    }
+
+    private static String formatArray(Object object, NumberFormat format, boolean executable)
+    {
         StringBuffer sb = new StringBuffer();
 
         sb.append(executable ? "{" : "[");
@@ -204,18 +214,36 @@
             Collection<?> elements = (Collection<?>) object;
             for (Object element : elements)
             {
-                sb.append(sep).append(element);
+                sb.append(sep).append(formatElement(element, format));
 
                 sep = " ";
             }
         } 
         else if (object instanceof Number)
         {
-            sb.append(object);
+            sb.append(formatElement(object, format));
         }
 
         sb.append(executable ? "}" : "]");
 
         return sb.toString();
     }
+
+    private static String formatElement(Object object, NumberFormat format)
+    {
+        if(format != null)
+        {
+            if (object instanceof Double || object instanceof Float)
+            {
+                Number number = (Number)object;
+                return format.format(number.doubleValue());
+            }
+            else if (object instanceof Long || object instanceof Integer)
+            {
+                Number number = (Number)object;
+                return format.format(number.longValue());
+            }
+        }
+        return String.valueOf(object);
+    }
 }
\ No newline at end of file
