You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/05/10 01:47:28 UTC

svn commit: r654982 - /xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java

Author: acumiskey
Date: Fri May  9 16:47:28 2008
New Revision: 654982

URL: http://svn.apache.org/viewvc?rev=654982&view=rev
Log:
Checkstyle cleanup and javadoc

Modified:
    xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java?rev=654982&r1=654981&r2=654982&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java Fri May  9 16:47:28 2008
@@ -29,8 +29,16 @@
 import org.apache.fop.fonts.FontTriplet;
 import org.apache.fop.render.PrintRenderer;
 
-public class FontsSubstitutionTestCase extends BaseConstructiveUserConfigTestCase {
+/**
+ * Tests the font substitution mechanism
+ */
+public class FontsSubstitutionTestCase extends
+        BaseConstructiveUserConfigTestCase {
 
+    /**
+     * Main constructor
+     * @param name test case name
+     */
     public FontsSubstitutionTestCase(String name) {
         super(name);
     }
@@ -38,13 +46,16 @@
     /**
      * {@inheritDoc}
      */
-    protected byte[] convertFO(File foFile, FOUserAgent ua, boolean dumpPdfFile) throws Exception {
-        PrintRenderer renderer = (PrintRenderer)ua.getRendererFactory().createRenderer(ua, MimeConstants.MIME_PDF);
+    protected byte[] convertFO(File foFile, FOUserAgent ua, boolean dumpPdfFile)
+            throws Exception {
+        PrintRenderer renderer = (PrintRenderer) ua.getRendererFactory()
+                .createRenderer(ua, MimeConstants.MIME_PDF);
         FontInfo fontInfo = new FontInfo();
         renderer.setupFontInfo(fontInfo);
         FontManager fontManager = ua.getFactory().getFontManager();
         fontManager.setupRenderer(renderer);
-        FontTriplet triplet = new FontTriplet("Times", "italic", Font.WEIGHT_NORMAL);
+        FontTriplet triplet = new FontTriplet("Times", "italic",
+                Font.WEIGHT_NORMAL);
         String internalFontKey = fontInfo.getInternalFontKey(triplet);
         // Times italic should now be mapped to the 15th font (custom font)
         // not the original base 14 (F6)



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