Author: acumiskey
Date: Mon Oct 27 04:46:59 2008
New Revision: 708150

URL: http://svn.apache.org/viewvc?rev=708150&view=rev
Log:
Minor cleanup.

Modified:
    
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java

Modified: 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java?rev=708150&r1=708149&r2=708150&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java
 Mon Oct 27 04:46:59 2008
@@ -46,7 +46,8 @@
     /**
      * The collection of map coded fonts (maximum of 254)
      */
-    private final List/*<FontDefinition>*/ fontList = new 
java.util.ArrayList();
+    private final List/*<FontDefinition>*/ fontList
+        = new java.util.ArrayList/*<FontDefinition>*/();
 
     /**
      * Constructor for the MapCodedFont
@@ -151,22 +152,22 @@
     public void addFont(int fontReference, AFPFont font, int size, int 
orientation)
         throws MaximumSizeExceededException {
 
-        FontDefinition fd = new FontDefinition();
+        FontDefinition fontDefinition = new FontDefinition();
 
-        fd.fontReferenceKey = BinaryUtils.convert(fontReference)[0];
+        fontDefinition.fontReferenceKey = 
BinaryUtils.convert(fontReference)[0];
 
         switch (orientation) {
             case 90:
-                fd.orientation = 0x2D;
+                fontDefinition.orientation = 0x2D;
                 break;
             case 180:
-                fd.orientation = 0x5A;
+                fontDefinition.orientation = 0x5A;
                 break;
             case 270:
-                fd.orientation = (byte) 0x87;
+                fontDefinition.orientation = (byte) 0x87;
                 break;
             default:
-                fd.orientation = 0x00;
+                fontDefinition.orientation = 0x00;
                 break;
         }
 
@@ -181,21 +182,21 @@
                     throw new FontRuntimeException(msg);
                 }
 
-                fd.characterSet = cs.getNameBytes();
+                fontDefinition.characterSet = cs.getNameBytes();
 
-                if (fd.characterSet.length != 8) {
+                if (fontDefinition.characterSet.length != 8) {
                     throw new IllegalArgumentException("The character set "
-                        + new String(fd.characterSet,
+                        + new String(fontDefinition.characterSet,
                         AFPConstants.EBCIDIC_ENCODING)
                         + " must have a fixed length of 8 characters.");
                 }
 
-                fd.codePage = cs.getCodePage().getBytes(
+                fontDefinition.codePage = cs.getCodePage().getBytes(
                     AFPConstants.EBCIDIC_ENCODING);
 
-                if (fd.codePage.length != 8) {
+                if (fontDefinition.codePage.length != 8) {
                     throw new IllegalArgumentException("The code page "
-                        + new String(fd.codePage,
+                        + new String(fontDefinition.codePage,
                         AFPConstants.EBCIDIC_ENCODING)
                         + " must have a fixed length of 8 characters.");
                 }
@@ -203,18 +204,18 @@
             } else if (font instanceof OutlineFont) {
                 OutlineFont outline = (OutlineFont) font;
                 CharacterSet cs = outline.getCharacterSet();
-                fd.characterSet = cs.getNameBytes();
+                fontDefinition.characterSet = cs.getNameBytes();
 
                 // There are approximately 72 points to 1 inch or 20 1440ths 
per point.
 
-                fd.scale = ((size / 1000) * 20);
+                fontDefinition.scale = ((size / 1000) * 20);
 
-                fd.codePage = cs.getCodePage().getBytes(
+                fontDefinition.codePage = cs.getCodePage().getBytes(
                     AFPConstants.EBCIDIC_ENCODING);
 
-                if (fd.codePage.length != 8) {
+                if (fontDefinition.codePage.length != 8) {
                     throw new IllegalArgumentException("The code page "
-                        + new String(fd.codePage,
+                        + new String(fontDefinition.codePage,
                         AFPConstants.EBCIDIC_ENCODING)
                         + " must have a fixed length of 8 characters.");
                 }
@@ -229,7 +230,7 @@
                 // Throw an exception if the size is exceeded
                 throw new MaximumSizeExceededException();
             } else {
-                fontList.add(fd);
+                fontList.add(fontDefinition);
             }
 
         } catch (UnsupportedEncodingException ex) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to