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 je...@apache.org on 2008/07/25 14:46:22 UTC

svn commit: r679781 [13/34] - in /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign: ./ examples/embedding/java/embedding/ examples/embedding/java/embedding/events/ examples/embedding/java/embedding/intermediate/ examples/embedding/java/embedding/model/ ...

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,7 +36,7 @@
     //List<NamedCharacter>
     private Map charMap = new java.util.HashMap();
     //Map<Character(Unicode), Character(code point)>
-    
+
     /**
      * Main constructor.
      * @param name the encoding's name
@@ -44,7 +44,7 @@
     public SimpleSingleByteEncoding(String name) {
         this.name = name;
     }
-    
+
     /** {@inheritDoc} */
     public String getName() {
         return this.name;
@@ -65,11 +65,11 @@
         Arrays.fill(map, Glyphs.NOTDEF);
         for (int i = getFirstChar(); i <= getLastChar(); i++) {
             NamedCharacter ch = (NamedCharacter)this.mapping.get(i - 1);
-            map[i] = ch.getName(); 
+            map[i] = ch.getName();
         }
         return map;
     }
-    
+
     /**
      * Returns the index of the first defined character.
      * @return the index of the first defined character (always 1 for this class)
@@ -77,7 +77,7 @@
     public int getFirstChar() {
         return 1;
     }
-    
+
     /**
      * Returns the index of the last defined character.
      * @return the index of the last defined character
@@ -85,7 +85,7 @@
     public int getLastChar() {
         return this.mapping.size();
     }
-    
+
     /**
      * Returns the number of characters defined by this encoding.
      * @return the number of characters
@@ -93,7 +93,7 @@
     public int getSize() {
         return this.mapping.size() + 1;
     }
-    
+
     /**
      * Indicates whether the encoding is full (with 256 code points).
      * @return true if the encoding is full
@@ -101,7 +101,7 @@
     public boolean isFull() {
         return (getSize() == 256);
     }
-    
+
     /**
      * Adds a new character to the encoding.
      * @param ch the named character
@@ -136,10 +136,10 @@
             return null;
         }
     }
-    
+
     /** {@inheritDoc} */
     public String toString() {
         return getName() + " (" + getSize() + " chars)";
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteEncoding.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,5 +46,5 @@
      *                  (unmapped code points are represented by a ".notdef" value)
      */
     String[] getCharNameMap();
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteFont.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/SingleByteFont.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,17 +40,17 @@
     private Map unencodedCharacters;
     //Map<Character, UnencodedCharacter>
     private List additionalEncodings;
-    
+
     /**
      * Main constructor.
      */
     public SingleByteFont() {
         setEncoding(CodePointMapping.WIN_ANSI_ENCODING);
     }
-    
+
     /** {@inheritDoc} */
     public boolean isEmbeddable() {
-        return (!(getEmbedFileName() == null 
+        return (!(getEmbedFileName() == null
                 && getEmbedResourceName() == null));
     }
 
@@ -66,7 +66,7 @@
     public SingleByteEncoding getEncoding() {
         return this.mapping;
     }
-    
+
     /** {@inheritDoc} */
     public int getWidth(int i, int size) {
         if (i < 256) {
@@ -101,7 +101,7 @@
         if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {
             return d;
         }
-        
+
         //Check unencoded characters which are available in the font by character name
         d = mapUnencodedChar(c);
         if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {
@@ -121,7 +121,7 @@
                 }
                 SimpleSingleByteEncoding encoding = null;
                 char mappedStart = 0;
-                int additionalsCount = this.additionalEncodings.size(); 
+                int additionalsCount = this.additionalEncodings.size();
                 for (int i = 0; i < additionalsCount; i++) {
                     mappedStart += 256;
                     encoding = getAdditionalEncoding(i);
@@ -172,7 +172,7 @@
             log.error("Font '" + super.getFontName() + "': " + e.getMessage());
         }
     }
-    
+
     /**
      * Sets the encoding of the font.
      * @param encoding the encoding (ex. "WinAnsiEncoding" or "SymbolEncoding")
@@ -180,7 +180,7 @@
     public void setEncoding(String encoding) {
         updateMapping(encoding);
     }
-    
+
     /**
      * Sets the encoding of the font.
      * @param encoding the encoding information
@@ -225,7 +225,7 @@
     public boolean hasAdditionalEncodings() {
         return (this.additionalEncodings != null) && (this.additionalEncodings.size() > 0);
     }
-    
+
     /**
      * Returns the number of additional encodings this single-byte font maintains.
      * @return the number of additional encodings
@@ -237,7 +237,7 @@
             return 0;
         }
     }
-    
+
     /**
      * Returns an additional encoding.
      * @param index the index of the additional encoding
@@ -252,7 +252,7 @@
             throw new IndexOutOfBoundsException("No additional encodings available");
         }
     }
-    
+
     /**
      * Returns an array with the widths for an additional encoding.
      * @param index the index of the additional encoding
@@ -269,25 +269,25 @@
         }
         return arr;
     }
-    
+
     private static final class UnencodedCharacter {
-        
+
         private NamedCharacter character;
         private int width;
-        
+
         public UnencodedCharacter(NamedCharacter character, int width) {
             this.character = character;
             this.width = width;
         }
-        
+
         public NamedCharacter getCharacter() {
             return this.character;
         }
-        
+
         public int getWidth() {
             return this.width;
         }
-        
+
         /** {@inheritDoc} */
         public String toString() {
             return getCharacter().toString();

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Typeface.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Typeface.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Typeface.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/Typeface.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts;
 
 import java.util.Set;
@@ -45,7 +45,7 @@
      * long out of statistical interest.
      */
     private long charMapOps = 0;
-    
+
     /** An optional event listener that receives events such as missing glyphs etc. */
     protected FontEventListener eventListener;
 
@@ -71,9 +71,9 @@
     protected void notifyMapOperation() {
         this.charMapOps++;
     }
-    
+
     /**
-     * Indicates whether this font had to do any character mapping operations. If that was 
+     * Indicates whether this font had to do any character mapping operations. If that was
      * not the case, it's an indication that the font has never actually been used.
      * @return true if the font had to do any character mapping operations
      */
@@ -87,7 +87,7 @@
      * @return True if the character is supported, Falso otherwise
      */
     public abstract boolean hasChar(char c);
-    
+
     /**
      * Determines whether the font is a multibyte font.
      * @return True if it is multibyte
@@ -100,7 +100,7 @@
     public int getMaxAscent(int size) {
         return getAscender(size);
     }
-    
+
     /**
      * Sets the font event listener that can be used to receive events about particular events
      * in this class.
@@ -109,10 +109,10 @@
     public void setEventListener(FontEventListener listener) {
         this.eventListener = listener;
     }
-    
+
     /**
      * Provide proper warning if a glyph is not available.
-     * 
+     *
      * @param c
      *            the character which is missing.
      */

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts.apps;
 
 import java.io.File;
@@ -81,10 +81,10 @@
         }
         return (String[])arguments.toArray(new String[0]);
     }
-    
+
     /**
      * Sets the logging level.
-     * @param level the logging level ("debug", "info", "error" etc., see Jakarta Commons Logging) 
+     * @param level the logging level ("debug", "info", "error" etc., see Jakarta Commons Logging)
      */
     protected static void setLogLevel(String level) {
         // Set the evel for future loggers.
@@ -94,7 +94,7 @@
             ((CommandLineLogger) log).setLogLevel(level);
         }
     }
-    
+
     /**
      * Determines the log level based of the options from the command-line.
      * @param options the command-line options
@@ -120,7 +120,7 @@
     public void writeFontXML(org.w3c.dom.Document doc, String target) throws TransformerException {
         writeFontXML(doc, new File(target));
     }
-    
+
     /**
      * Writes the generated DOM Document to a file.
      *
@@ -130,7 +130,7 @@
      */
     public void writeFontXML(org.w3c.dom.Document doc, File target) throws TransformerException {
         log.info("Writing xml font file " + target + "...");
-    
+
         try {
             OutputStream out = new java.io.FileOutputStream(target);
             out = new java.io.BufferedOutputStream(out);
@@ -147,5 +147,5 @@
             throw new TransformerException("Error writing the output file", ioe);
         }
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/PFMReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/PFMReader.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/PFMReader.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/PFMReader.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts.apps;
 
 import java.io.IOException;
@@ -38,7 +38,7 @@
  * XML font metrics file for use in FOP.
  */
 public class PFMReader extends AbstractFontReader {
-    
+
     /**
      * Main constructor.
      */
@@ -94,7 +94,7 @@
         // defined.
         LogFactory logFactory = LogFactory.getFactory();
         if (System.getProperty("org.apache.commons.logging.Log") == null) {
-            logFactory.setAttribute("org.apache.commons.logging.Log", 
+            logFactory.setAttribute("org.apache.commons.logging.Log",
                                             CommandLineLogger.class.getName());
         }
 
@@ -129,10 +129,10 @@
                 PFMFile pfm = app.loadPFM(arguments[0]);
                 if (pfm != null) {
                     app.preview(pfm);
-    
+
                     Document doc = app.constructFontXML(pfm,
                             fontName, className, embResource, embFile);
-    
+
                     app.writeFontXML(doc, arguments[1]);
                 }
                 log.info("XML font metrics file successfullly created.");
@@ -177,7 +177,7 @@
             log.info("XHeight: " + pfm.getXHeight());
             log.info("LowerCaseAscent: " + pfm.getLowerCaseAscent());
             log.info("LowerCaseDescent: " + pfm.getLowerCaseDescent());
-            log.info("Having widths for " + (pfm.getLastChar() - pfm.getFirstChar()) 
+            log.info("Having widths for " + (pfm.getLastChar() - pfm.getFirstChar())
                         + " characters (" + pfm.getFirstChar()
                         + "-" + pfm.getLastChar() + ").");
             log.info("for example: Char " + pfm.getFirstChar()

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/TTFReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/TTFReader.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/TTFReader.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/apps/TTFReader.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts.apps;
 
 import java.io.IOException;
@@ -48,14 +48,14 @@
     public static final String METRICS_VERSION_ATTR = "metrics-version";
     /** Current version number for the metrics file */
     public static final int METRICS_VERSION = 2;
-    
+
     /**
      * Main constructor.
      */
     public TTFReader() {
         super();
     }
-    
+
     private static void displayUsage() {
         System.out.println(
                 "java " + TTFReader.class.getName() + " [options] fontfile.ttf xmlfile.xml");
@@ -118,7 +118,7 @@
         // defined.
         LogFactory logFactory = LogFactory.getFactory();
         if (System.getProperty("org.apache.commons.logging.Log") == null) {
-            logFactory.setAttribute("org.apache.commons.logging.Log", 
+            logFactory.setAttribute("org.apache.commons.logging.Log",
                                             CommandLineLogger.class.getName());
         }
 
@@ -166,17 +166,17 @@
                     org.w3c.dom.Document doc = app.constructFontXML(ttf,
                             fontName, className, embResource, embFile, isCid,
                             ttcName);
-    
+
                     if (isCid) {
                         log.info("Creating CID encoded metrics...");
                     } else {
                         log.info("Creating WinAnsi encoded metrics...");
                     }
-    
+
                     if (doc != null) {
                         app.writeFontXML(doc, arguments[1]);
                     }
-    
+
                     if (ttf.isEmbeddable()) {
                         log.info("This font contains no embedding license restrictions.");
                     } else {
@@ -274,7 +274,7 @@
         }
         Set familyNames = ttf.getFamilyNames();
         if (familyNames.size() > 0) {
-            String familyName = (String)familyNames.iterator().next(); 
+            String familyName = (String)familyNames.iterator().next();
             el = doc.createElement("family-name");
             root.appendChild(el);
             el.appendChild(doc.createTextNode(familyName));
@@ -356,7 +356,7 @@
     private void generateDOM4MultiByteExtras(Element parent, TTFFile ttf, boolean isCid) {
         Element el;
         Document doc = parent.getOwnerDocument();
-        
+
         Element mel = doc.createElement("multibyte-extras");
         parent.appendChild(mel);
 
@@ -421,11 +421,11 @@
             el.setAttribute("wdt", String.valueOf(ttf.getCharWidth(i)));
         }
     }
-    
+
     private void generateDOM4Kerning(Element parent, TTFFile ttf, boolean isCid) {
         Element el;
         Document doc = parent.getOwnerDocument();
-        
+
         // Get kerning
         Iterator iter;
         if (isCid) {
@@ -464,8 +464,8 @@
     }
 
 
-    /** 
-     * Bugzilla 40739, check that attr has a metrics-version attribute 
+    /**
+     * Bugzilla 40739, check that attr has a metrics-version attribute
      * compatible with ours.
      * @param attr attributes read from the root element of a metrics XML file
      * @throws SAXException if incompatible
@@ -480,20 +480,20 @@
             try {
                 version = Integer.parseInt(str);
                 if (version < METRICS_VERSION) {
-                    err = "Incompatible " + METRICS_VERSION_ATTR 
+                    err = "Incompatible " + METRICS_VERSION_ATTR
                         + " value (" + version + ", should be " + METRICS_VERSION
                         + ")"
-                     ; 
+                     ;
                 }
             } catch (NumberFormatException e) {
-                err = "Invalid " + METRICS_VERSION_ATTR 
+                err = "Invalid " + METRICS_VERSION_ATTR
                     + " attribute value (" + str + ")";
             }
         }
-        
+
         if (err != null) {
             throw new SAXException(
-                err 
+                err
                 + " - please regenerate the font metrics file with "
                 + "a more recent version of FOP."
             );

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontFileFinder.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -125,7 +125,7 @@
 
     /**
      * Automagically finds a list of font files on local system
-     * 
+     *
      * @return List&lt;URL&gt; of font files
      * @throws IOException io exception
      * {@inheritDoc}
@@ -153,7 +153,7 @@
 
     /**
      * Searches a given directory for font files
-     * 
+     *
      * @param dir directory to search
      * @return list of font files
      * @throws IOException thrown if an I/O exception of some sort has occurred

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontFinder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontFinder.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,10 +27,10 @@
  * for available fonts.
  */
 public interface FontFinder {
-    
+
     /**
      * Finds a list of font files.
-     * 
+     *
      * @return list of font files. List&lt;URL&gt; in the case of the
      *         FontFinder, and List&lt;File&gt; in the case of the
      *         FonrDirFinders.
@@ -38,5 +38,5 @@
      *             In case of an I/O problem
      */
     List find() throws IOException;
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/FontInfoFinder.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,7 +67,7 @@
     /**
      * Attempts to determine FontTriplets from a given CustomFont.
      * It seems to be fairly accurate but will probably require some tweaking over time
-     * 
+     *
      * @param customFont CustomFont
      * @param triplet Collection that will take the generated triplets
      */
@@ -160,7 +160,7 @@
 
     /**
      * Attempts to determine EmbedFontInfo from a given font file.
-     * 
+     *
      * @param fontUrl font URL. Assumed to be local.
      * @param resolver font resolver used to resolve font
      * @param fontCache font cache (may be null)

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/MacFontDirFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/MacFontDirFinder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/MacFontDirFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/MacFontDirFinder.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,5 +35,5 @@
            "/System/Library/Fonts/", // system
            "/Network/Library/Fonts/" // network
         };
-    }    
+    }
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/NativeFontDirFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/NativeFontDirFinder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/NativeFontDirFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/NativeFontDirFinder.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,7 +26,7 @@
  * Native font finder base class
  */
 public abstract class NativeFontDirFinder implements FontFinder {
-    
+
     /**
      * Generic method used by Mac and Unix font finders.
      * @return list of natively existing font directories
@@ -45,11 +45,11 @@
         }
         return fontDirList;
     }
-    
+
     /**
-     * Returns an array of directories to search for fonts in. 
+     * Returns an array of directories to search for fonts in.
      * @return an array of directories
      */
     protected abstract String[] getSearchableDirectories();
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/UnixFontDirFinder.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,5 +36,5 @@
             "/usr/share/fonts", // system
             "/usr/X11R6/lib/X11/fonts" // X
         };
-    }    
+    }
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/autodetect/WindowsFontDirFinder.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,10 +29,10 @@
  * FontFinder for native Windows platforms
  */
 public class WindowsFontDirFinder implements FontFinder {
-        
+
     /**
      * Attempts to read windir environment variable on windows
-     * (disclaimer: This is a bit dirty but seems to work nicely) 
+     * (disclaimer: This is a bit dirty but seems to work nicely)
      */
     private String getWinDir(String osName) throws IOException {
         Process process = null;
@@ -82,7 +82,7 @@
                 fontDirList.add(psFontsDir);
             }
         } else {
-            String windowsDirName = osName.endsWith("NT") ? "WINNT" : "WINDOWS";                
+            String windowsDirName = osName.endsWith("NT") ? "WINNT" : "WINDOWS";
             // look for true type font folder
             for (char driveLetter = 'C'; driveLetter <= 'E'; driveLetter++) {
                 osFontsDir = new File(

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/base14/Base14FontCollection.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/base14/Base14FontCollection.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/base14/Base14FontCollection.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/base14/Base14FontCollection.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,7 +32,7 @@
 
     /**
      * Main constructor
-     * 
+     *
      * @param kerning set to true when font kerning is enabled
      */
     public Base14FontCollection(boolean kerning) {

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/AttributeValue.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/AttributeValue.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/AttributeValue.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/AttributeValue.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
     /**
      * Returns an <code>AttributeValue</code> object holding the
      * value of the specified <code>String</code>.
-     * 
+     *
      * @param valuesString the value to be parsed
      * @return     an <code>AttributeValue</code> object holding the value
      *             represented by the string argument.

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontQualifier.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontQualifier.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontQualifier.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontQualifier.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -144,7 +144,7 @@
 
     /**
      * Returns a list of matching font triplet found in a given font info
-     * 
+     *
      * @param fontInfo the font info
      * @return a list of matching font triplets
      */

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitution.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitution.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitution.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitution.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,7 +29,7 @@
 
     /**
      * Main constructor
-     * 
+     *
      * @param fromQualifier the substitution from qualifier
      * @param toQualifier the substitution to qualifier
      */

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitutions.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontSubstitutionsConfigurator.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
 
     /**
      * Main constructor
-     * 
+     *
      * @param cfg a configuration
      */
     public FontSubstitutionsConfigurator(Configuration cfg) {
@@ -59,7 +59,7 @@
 
     /**
      * Configures a font substitution catalog
-     * 
+     *
      * @param substitutions font substitutions
      * @throws FOPException if something's wrong with the config data
      */

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontWeightRange.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontWeightRange.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontWeightRange.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/substitute/FontWeightRange.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,7 @@
     /**
      * Returns an <code>FontWeightRange</code> object holding the
      * range values of the specified <code>String</code>.
-     * 
+     *
      * @param weightRangeString the value range string
      * @return an <code>FontWeightRange</code> object holding the value ranges
      */

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/FontFileReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/FontFileReader.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/FontFileReader.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/FontFileReader.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts.truetype;
 
 import java.io.File;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFCmapEntry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFCmapEntry.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFCmapEntry.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFCmapEntry.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts.truetype;
 
 /**

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts.truetype;
 
 import java.io.IOException;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFile.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFile.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFile.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -111,7 +111,7 @@
 
     private int[] ansiWidth;
     private Map ansiIndex;
-    
+
     // internal mapping of glyph indexes to unicode indexes
     // used for quick mappings in this class
     private Map glyphToUnicodeMap = new java.util.HashMap();
@@ -120,12 +120,12 @@
     private TTFDirTabEntry currentDirTab;
 
     private boolean isCFF;
-    
+
     /**
      * logging instance
      */
     protected Log log = LogFactory.getLog(TTFFile.class);
-    
+
     /**
      * Key-value helper class
      */
@@ -186,7 +186,7 @@
         if (n < 0) {
             long rest1 = n % upem;
             long storrest = 1000 * rest1;
-            long ledd2 = (storrest != 0 ? rest1 / storrest : 0);  
+            long ledd2 = (storrest != 0 ? rest1 / storrest : 0);
             ret = -((-1000 * n) / upem - (int)ledd2);
         } else {
             ret = (n / upem) * 1000 + ((n % upem) * 1000) / upem;
@@ -329,7 +329,7 @@
                                 Iterator e = v.listIterator();
                                 while (e.hasNext()) {
                                     Integer aIdx = (Integer)e.next();
-                                    ansiWidth[aIdx.intValue()] 
+                                    ansiWidth[aIdx.intValue()]
                                         = mtxTab[glyphIdx].getWx();
 
                                     if (log.isTraceEnabled()) {
@@ -754,7 +754,7 @@
     public boolean isCFF() {
        return this.isCFF;
     }
-    
+
     /**
      * Read Table Directory from the current position in the
      * FontFileReader and fill the global HashMap dirTabs
@@ -840,11 +840,11 @@
     protected void readHorizontalHeader(FontFileReader in)
             throws IOException {
         seekTab(in, "hhea", 4);
-        hheaAscender = in.readTTFShort(); 
+        hheaAscender = in.readTTFShort();
         log.debug("hhea.Ascender: " + hheaAscender + " " + convertTTFUnit2PDFUnit(hheaAscender));
         hheaDescender = in.readTTFShort();
         log.debug("hhea.Descender: " + hheaDescender + " " + convertTTFUnit2PDFUnit(hheaDescender));
-        
+
         in.skip(2 + 2 + 3 * 2 + 8 * 2);
         nhmtx = in.readTTFUShort();
         log.debug("Number of horizontal metrics: " + nhmtx);
@@ -988,10 +988,10 @@
         if (dirTabs.get("OS/2") != null) {
             seekTab(in, "OS/2", 2 * 2);
             this.usWeightClass = in.readTTFUShort();
-            
+
             // usWidthClass
             in.skip(2);
-            
+
             int fsType = in.readTTFUShort();
             if (fsType == 2) {
                 isEmbeddable = false;
@@ -1005,10 +1005,10 @@
             in.skip(3 * 2);
             int v;
             os2Ascender = in.readTTFShort(); //sTypoAscender
-            log.debug("sTypoAscender: " + os2Ascender 
+            log.debug("sTypoAscender: " + os2Ascender
                         + " " + convertTTFUnit2PDFUnit(os2Ascender));
             os2Descender = in.readTTFShort(); //sTypoDescender
-            log.debug("sTypoDescender: " + os2Descender 
+            log.debug("sTypoDescender: " + os2Descender
                         + " " + convertTTFUnit2PDFUnit(os2Descender));
             v = in.readTTFShort(); //sTypoLineGap
             log.debug("sTypoLineGap: " + v);
@@ -1021,7 +1021,7 @@
             log.debug("sxHeight: " + this.os2xHeight);
             this.os2CapHeight = in.readTTFShort(); //sCapHeight
             log.debug("sCapHeight: " + this.os2CapHeight);
-            
+
         } else {
             isEmbeddable = true;
         }
@@ -1123,7 +1123,7 @@
             int k = in.readTTFUShort();
             int l = in.readTTFUShort();
 
-            if (((platformID == 1 || platformID == 3) 
+            if (((platformID == 1 || platformID == 3)
                     && (encodingID == 0 || encodingID == 1))) {
                 in.seekSet(j + in.readTTFUShort());
                 String txt;
@@ -1132,9 +1132,9 @@
                 } else {
                     txt = in.readTTFString(l);
                 }
-                
+
                 if (log.isDebugEnabled()) {
-                    log.debug(platformID + " " 
+                    log.debug(platformID + " "
                             + encodingID + " "
                             + languageID + " "
                             + k + " " + txt);
@@ -1182,11 +1182,11 @@
         if (dirTab != null) {
             in.seekSet(dirTab.getOffset() + 4 + 4 + 2);
             xHeight = in.readTTFUShort();
-            log.debug("xHeight from PCLT: " + xHeight 
+            log.debug("xHeight from PCLT: " + xHeight
                             + " " + convertTTFUnit2PDFUnit(xHeight));
             in.skip(2 * 2);
             capHeight = in.readTTFUShort();
-            log.debug("capHeight from PCLT: " + capHeight 
+            log.debug("capHeight from PCLT: " + capHeight
                             + " " + convertTTFUnit2PDFUnit(capHeight));
             in.skip(2 + 16 + 8 + 6 + 1 + 1);
 
@@ -1211,7 +1211,7 @@
      * the hhea values are defined after the Apple interpretation, but not in every font. The
      * same problem is in the OS/2 table. FOP needs the ascender and descender to determine the
      * baseline so we need values which add up more or less to the "em box". However, due to
-     * accent modifiers a character can grow beyond the em box. 
+     * accent modifiers a character can grow beyond the em box.
      */
     private void determineAscDesc() {
         int hheaBoxHeight = hheaAscender - hheaDescender;
@@ -1279,7 +1279,7 @@
                 }
             }
         }
-        log.debug("Ascender from glyph 'd': " + localAscender 
+        log.debug("Ascender from glyph 'd': " + localAscender
                 + " " + convertTTFUnit2PDFUnit(localAscender));
         log.debug("Descender from glyph 'p': " + localDescender
                 + " " + convertTTFUnit2PDFUnit(localDescender));
@@ -1351,7 +1351,7 @@
                         final Integer u2 = glyphToUnicode(j);
                         if (iObj == null) {
                             // happens for many fonts (Ubuntu font set),
-                            // stray entries in the kerning table?? 
+                            // stray entries in the kerning table??
                             log.debug("Ignoring kerning pair because no Unicode index was"
                                     + " found for the first glyph " + i);
                         } else if (u2 == null) {
@@ -1370,7 +1370,7 @@
             }
 
             // Create winAnsiEncoded kerning table from kerningTab
-            // (could probably be simplified, for now we remap back to CID indexes and 
+            // (could probably be simplified, for now we remap back to CID indexes and
             // then to winAnsi)
             Iterator ae = kerningTab.keySet().iterator();
             while (ae.hasNext()) {
@@ -1534,7 +1534,7 @@
             return null;
         }
     }
-    
+
     /*
      * Helper classes, they are not very efficient, but that really
      * doesn't matter...
@@ -1580,7 +1580,7 @@
 
     /**
      * Map a glyph index to the corresponding unicode code point
-     * 
+     *
      * @param glyphIndex
      * @return unicode code point
      * @throws IOException if glyphIndex not found
@@ -1588,10 +1588,10 @@
     private Integer glyphToUnicode(int glyphIndex) throws IOException {
         return (Integer) glyphToUnicodeMap.get(new Integer(glyphIndex));
     }
-    
+
     /**
-     * Map a unicode code point to the corresponding glyph index 
-     * 
+     * Map a unicode code point to the corresponding glyph index
+     *
      * @param unicodeIndex unicode code point
      * @return glyph index
      * @throws IOException if unicodeIndex not found
@@ -1605,7 +1605,7 @@
         }
         return result;
     }
-    
+
     /**
      * Static main method to get info about a TrueType font.
      * @param args The command line arguments

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,7 +46,7 @@
     private MultiByteFont multiFont;
     private SingleByteFont singleFont;
     private String subFontName;
-    
+
     /**
      * Default constructor
      * @param fontFileURI the URI representing the font file
@@ -55,7 +55,7 @@
     public TTFFontLoader(String fontFileURI, FontResolver resolver) {
         this(fontFileURI, null, true, resolver);
     }
-    
+
     /**
      * Additional constructor for TrueType Collections.
      * @param fontFileURI the URI representing the font file
@@ -69,14 +69,14 @@
         super(fontFileURI, embedded, resolver);
         this.subFontName = subFontName;
     }
-    
+
     /** {@inheritDoc} */
     protected void read() throws IOException {
         read(this.subFontName);
     }
 
     /**
-     * Reads a TrueType font. 
+     * Reads a TrueType font.
      * @param ttcFontName the TrueType sub-font name of TrueType Collection (may be null for
      *    normal TrueType fonts)
      * @throws IOException if an I/O error occurs
@@ -96,16 +96,16 @@
             IOUtils.closeQuietly(in);
         }
     }
-    
-    
+
+
     private void buildFont(TTFFile ttf, String ttcFontName) {
         if (ttf.isCFF()) {
             throw new UnsupportedOperationException(
                     "OpenType fonts with CFF data are not supported, yet");
         }
-        
+
         boolean isCid = this.embedded;
-        
+
         if (isCid) {
             multiFont = new MultiByteFont();
             returnFont = multiFont;
@@ -153,7 +153,7 @@
             returnFont.setLastChar(ttf.getLastChar());
             copyWidthsSingleByte(ttf);
         }
-        
+
         copyKerning(ttf, isCid);
         if (this.embedded && ttf.isEmbeddable()) {
             multiFont.setEmbedFileName(this.fontFileURI);
@@ -184,12 +184,12 @@
             }
         }
     }
-    
+
     /**
      * Copy kerning information.
      */
     private void copyKerning(TTFFile ttf, boolean isCid) {
-        
+
         // Get kerning
         Iterator iter;
         if (isCid) {
@@ -209,5 +209,5 @@
             }
             returnFont.putKerningEntry(kpx1, h2);
         }
-    }    
+    }
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFMtxEntry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFMtxEntry.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFMtxEntry.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFMtxEntry.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts.truetype;
 
 import java.util.List;
@@ -37,7 +37,7 @@
 
     /**
      * Returns a String representation of this object.
-     * 
+     *
      * @param t TTFFile to use for unit conversion
      * @return String String representation
      */
@@ -81,7 +81,7 @@
     public int getIndex() {
         return index;
     }
-        
+
     /**
      * Determines whether this index represents a reserved character.
      * @return True if it is reserved
@@ -89,7 +89,7 @@
     public boolean isIndexReserved() {
         return (getIndex() >= 32768) && (getIndex() <= 65535);
     }
-    
+
     /**
      * Returns a String representation of the index taking into account if
      * the index is in the reserved range.

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFSubSetFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFSubSetFile.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFSubSetFile.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/truetype/TTFSubSetFile.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.fonts.truetype;
 
 import java.io.IOException;
@@ -86,7 +86,7 @@
         }
         return numTables;
     }
-    
+
     /**
      * Create the directory table
      */
@@ -651,7 +651,7 @@
         if (!checkTTC(in, name)) {
             throw new IOException("Failed to read font");
         }
-        
+
         //Copy the Map as we're going to modify it
         Map subsetGlyphs = new java.util.HashMap(glyphs);
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMCharMetrics.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMCharMetrics.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMCharMetrics.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMCharMetrics.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@
     private double widthX;
     private double widthY;
     private RectangularShape bBox;
-    
+
     /**
      * Returns the character code.
      * @return the charCode (-1 if not part of the encoding)
@@ -42,7 +42,7 @@
     public int getCharCode() {
         return charCode;
     }
-    
+
     /**
      * Indicates whether the character has a character code, i.e. is part of the default encoding.
      * @return true if there is a character code.
@@ -50,7 +50,7 @@
     public boolean hasCharCode() {
         return charCode >= 0;
     }
-    
+
     /**
      * Sets the character code.
      * @param charCode the charCode to set
@@ -58,7 +58,7 @@
     public void setCharCode(int charCode) {
         this.charCode = charCode;
     }
-    
+
     /**
      * Returns the named character represented by this instance.
      * @return the named character (or null if no named character is associated)
@@ -66,7 +66,7 @@
     public NamedCharacter getCharacter() {
         return this.character;
     }
-    
+
     /**
      * Sets the named character represented by this instance.
      * @param ch the named character
@@ -74,7 +74,7 @@
     public void setCharacter(NamedCharacter ch) {
         this.character = ch;
     }
-    
+
     /**
      * Sets the named character represented by this instance.
      * @param charName the character name (as defined in the Adobe glyph list)
@@ -83,7 +83,7 @@
     public void setCharacter(String charName, String unicodeSequence) {
         setCharacter(new NamedCharacter(charName, unicodeSequence));
     }
-    
+
     /**
      * Returns the Unicode sequence for this character.
      * @return the Unicode characters
@@ -92,7 +92,7 @@
     public String getUnicodeSequence() {
         return (getCharacter() != null ? getCharacter().getUnicodeSequence() : null);
     }
-    
+
     /**
      * Returns the PostScript character name.
      * @return the charName (or null if no character name is associated)
@@ -100,7 +100,7 @@
     public String getCharName() {
         return (getCharacter() != null ? getCharacter().getName() : null);
     }
-    
+
     /**
      * Returns the progression dimension in x-direction.
      * @return the widthX
@@ -108,7 +108,7 @@
     public double getWidthX() {
         return widthX;
     }
-    
+
     /**
      * Sets the progression dimension in x-direction
      * @param widthX the widthX to set
@@ -116,7 +116,7 @@
     public void setWidthX(double widthX) {
         this.widthX = widthX;
     }
-    
+
     /**
      * Returns the progression dimension in y-direction.
      * @return the widthY
@@ -124,7 +124,7 @@
     public double getWidthY() {
         return widthY;
     }
-    
+
     /**
      * Sets the progression dimension in y-direction
      * @param widthY the widthY to set
@@ -132,7 +132,7 @@
     public void setWidthY(double widthY) {
         this.widthY = widthY;
     }
-    
+
     /**
      * Returns the character's bounding box.
      * @return the bounding box (or null if it isn't available)
@@ -163,5 +163,5 @@
         sb.append(getCharName()).append(')');
         return sb.toString();
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMFile.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMFile.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMFile.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,13 +36,13 @@
     private String fontName;
     private String fullName;
     private String familyName;
-    
+
     private String weight;
     private RectangularShape fontBBox;
-    
+
     private String encodingScheme;
     private String characterSet;
-    
+
     private Number capHeight;
     private Number xHeight;
     private Number ascender;
@@ -52,17 +52,17 @@
 
     private AFMWritingDirectionMetrics[] writingDirectionMetrics
         = new AFMWritingDirectionMetrics[3];
-    
+
     private List charMetrics = new java.util.ArrayList();
     //List<AFMCharMetrics>
     private Map charNameToMetrics = new java.util.HashMap();
     //Map<String, AFMCharMetrics>
     private int firstChar = -1;
     private int lastChar = -1;
-    
+
     private Map kerningMap;
     //Map<String, Map<String, Dimension2D>>
-    
+
     /**
      * Default constructor.
      */
@@ -149,10 +149,10 @@
     public int[] getFontBBoxAsIntArray() {
         RectangularShape rect = getFontBBox();
         return new int[] {
-                (int)Math.floor(rect.getMinX()), (int)Math.floor(rect.getMinY()), 
-                (int)Math.ceil(rect.getMaxX()), (int)Math.ceil(rect.getMaxY())}; 
+                (int)Math.floor(rect.getMinX()), (int)Math.floor(rect.getMinY()),
+                (int)Math.ceil(rect.getMaxX()), (int)Math.ceil(rect.getMaxY())};
     }
-    
+
     /**
      * Sets the FontBBox value.
      * @param fontBBox the fontBBox to set
@@ -256,7 +256,7 @@
     public void setDescender(Number descender) {
         this.descender = descender;
     }
-    
+
     /**
      * Returns the StdHW value.
      * @return the descender
@@ -272,7 +272,7 @@
     public void setStdHW(Number stdHW) {
         this.stdHW = stdHW;
     }
-    
+
     /**
      * Returns the StdVW value.
      * @return the descender
@@ -288,7 +288,7 @@
     public void setStdVW(Number stdVW) {
         this.stdVW = stdVW;
     }
-    
+
     /**
      * Gets writing direction metrics.
      * @param index the writing direction (0, 1 or 2)
@@ -297,7 +297,7 @@
     public AFMWritingDirectionMetrics getWritingDirectionMetrics(int index) {
         return this.writingDirectionMetrics[index];
     }
-    
+
     /**
      * Sets writing direction metrics.
      * @param index the writing direction (0, 1 or 2)
@@ -331,7 +331,7 @@
             }
         }
     }
-    
+
     /**
      * Returns the number of character available for this font.
      * @return the number of character
@@ -339,7 +339,7 @@
     public int getCharCount() {
         return this.charMetrics.size();
     }
-    
+
     /**
      * Returns the first character index in the encoding that has a glyph.
      * @return the first character index with a glyph
@@ -347,7 +347,7 @@
     public int getFirstChar() {
         return this.firstChar;
     }
-    
+
     /**
      * Returns the last character index in the encoding that has a glyph.
      * @return the last character index with a glyph
@@ -355,7 +355,7 @@
     public int getLastChar() {
         return this.lastChar;
     }
-    
+
     /**
      * Returns the character metrics associated with the character name.
      * @param name the character name
@@ -364,7 +364,7 @@
     public AFMCharMetrics getChar(String name) {
         return (AFMCharMetrics)this.charNameToMetrics.get(name);
     }
-    
+
     /**
      * Returns the list of AFMCharMetrics instances representing all the available characters.
      * @return a List of AFMCharMetrics instances
@@ -372,7 +372,7 @@
     public List getCharMetrics() {
         return Collections.unmodifiableList(this.charMetrics);
     }
-    
+
     /**
      * Adds a X-kerning entry.
      * @param name1 the name of the first character
@@ -390,7 +390,7 @@
         }
         entries.put(name2, new Dimension2DDouble(kx, 0));
     }
-    
+
     /**
      * Indicates whether the font has kerning information.
      * @return true if there is kerning information
@@ -398,7 +398,7 @@
     public boolean hasKerning() {
         return this.kerningMap != null;
     }
-    
+
     /**
      * Creates and returns a kerning map for writing mode 0 (ltr) with character codes.
      * @return the kerning map or null if there is no kerning information.
@@ -441,10 +441,10 @@
         }
         return m;
     }
-    
+
     /** {@inheritDoc} */
     public String toString() {
         return "AFM: " + getFullName();
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMParser.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMParser.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMParser.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/fonts/type1/AFMParser.java Fri Jul 25 05:44:20 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,7 +37,7 @@
  * Parses the contents of a Type 1 AFM font metrics file into an object structure ({@link AFMFile}).
  */
 public class AFMParser {
-    
+
     private static final String START_FONT_METRICS = "StartFontMetrics";
     //private static final String END_FONT_METRICS = "EndFontMetrics";
     private static final String FONT_NAME = "FontName";
@@ -89,10 +89,10 @@
 
     private static final int PARSE_NORMAL = 0;
     private static final int PARSE_CHAR_METRICS = 1;
-    
+
     private static final Map VALUE_PARSERS;
     private static final Map PARSE_MODE_CHANGES;
-    
+
     static {
         VALUE_PARSERS = new java.util.HashMap();
         VALUE_PARSERS.put(START_FONT_METRICS, new StartFontMetrics());
@@ -142,7 +142,7 @@
         PARSE_MODE_CHANGES.put(START_CHAR_METRICS, new Integer(PARSE_CHAR_METRICS));
         PARSE_MODE_CHANGES.put(END_CHAR_METRICS, new Integer(PARSE_NORMAL));
     }
-    
+
     /**
      * Main constructor.
      */
@@ -164,7 +164,7 @@
             IOUtils.closeQuietly(in);
         }
     }
-    
+
     /**
      * Parses an AFM file from a stream.
      * @param in the stream to read from
@@ -212,14 +212,14 @@
         }
         return (AFMFile)stack.pop();
     }
-    
+
     private String parseLine(String line, Stack stack) throws IOException {
         int startpos = 0;
         //Find key
         startpos = skipToNonWhiteSpace(line, startpos);
         int endpos = skipToWhiteSpace(line, startpos);
         String key = line.substring(startpos, endpos);
-        
+
         //Parse value
         startpos = skipToNonWhiteSpace(line, endpos);
         ValueHandler vp = (ValueHandler)VALUE_PARSERS.get(key);
@@ -228,7 +228,7 @@
         }
         return key;
     }
-    
+
     private String parseCharMetrics(String line, Stack stack) throws IOException {
         int startpos = 0;
         AFMCharMetrics chm = new AFMCharMetrics();
@@ -245,13 +245,13 @@
                 //EOL: No more key so break
                 break;
             }
-            
+
             //Extract value
             startpos = skipToNonWhiteSpace(line, endpos);
             endpos = skipToSemicolon(line, startpos);
             String value = line.substring(startpos, endpos).trim();
             startpos = endpos + 1;
-            
+
             //Parse value
             ValueHandler vp = (ValueHandler)VALUE_PARSERS.get(key);
             if (vp != null) {
@@ -266,7 +266,7 @@
         afm.addCharMetrics(chm);
         return null;
     }
-    
+
     private static int skipToNonWhiteSpace(String line, int startpos) {
         int pos = startpos;
         while (pos < line.length() && isWhitespace(line.charAt(pos))) {
@@ -297,21 +297,21 @@
     }
 
     // ---------------- Value Handlers ---------------------------
-    
+
     private interface ValueHandler {
         void parse(String line, int startpos, Stack stack) throws IOException;
     }
-    
+
     private abstract static class AbstractValueHandler implements ValueHandler {
-        
+
         protected int findValue(String line, int startpos) {
             return skipToWhiteSpace(line, startpos);
         }
-        
+
         protected String getStringValue(String line, int startpos) {
             return line.substring(startpos);
         }
-        
+
         protected Number getNumberValue(String line, int startpos) {
             try {
                 return new Integer(getIntegerValue(line, startpos));
@@ -319,23 +319,23 @@
                 return new Double(getDoubleValue(line, startpos));
             }
         }
-        
+
         protected int getIntegerValue(String line, int startpos) {
             int endpos = findValue(line, startpos);
             return Integer.parseInt(line.substring(startpos, endpos));
         }
-        
+
         protected double getDoubleValue(String line, int startpos) {
             int endpos = findValue(line, startpos);
             return Double.parseDouble(line.substring(startpos, endpos));
         }
-        
+
         protected Boolean getBooleanValue(String line, int startpos) {
             return Boolean.valueOf(getStringValue(line, startpos));
         }
-        
+
     }
-    
+
     private static class StartFontMetrics extends AbstractValueHandler {
         public void parse(String line, int startpos, Stack stack) throws IOException {
             int endpos = findValue(line, startpos);
@@ -348,14 +348,14 @@
             stack.push(afm);
         }
     }
-    
+
     private abstract static class BeanSetter extends AbstractValueHandler {
         private String method;
-        
+
         public BeanSetter(String variable) {
             this.method = "set" + variable;
         }
-        
+
         protected void setValue(Object target, Object value) {
             //Uses Java Beans API
             Statement statement = new Statement(target, method, new Object[] {value});
@@ -367,76 +367,76 @@
             }
         }
     }
-    
+
     private static class StringSetter extends BeanSetter {
-        
+
         public StringSetter(String variable) {
             super(variable);
         }
-        
+
         public void parse(String line, int startpos, Stack stack) throws IOException {
             String s = getStringValue(line, startpos);
             Object obj = stack.peek();
             setValue(obj, s);
         }
     }
-    
+
     private static class NamedCharacterSetter extends BeanSetter {
-        
+
         public NamedCharacterSetter(String variable) {
             super(variable);
         }
-        
+
         public void parse(String line, int startpos, Stack stack) throws IOException {
             NamedCharacter ch = new NamedCharacter(getStringValue(line, startpos));
             Object obj = stack.peek();
             setValue(obj, ch);
         }
     }
-    
+
     private static class NumberSetter extends BeanSetter {
         public NumberSetter(String variable) {
             super(variable);
         }
-        
+
         protected Object getContextObject(Stack stack) {
             return stack.peek();
         }
-        
+
         public void parse(String line, int startpos, Stack stack) throws IOException {
             Number num = getNumberValue(line, startpos);
             setValue(getContextObject(stack), num);
         }
     }
-    
+
     private static class IntegerSetter extends NumberSetter {
         public IntegerSetter(String variable) {
             super(variable);
         }
-        
+
         public void parse(String line, int startpos, Stack stack) throws IOException {
             int value = getIntegerValue(line, startpos);
             setValue(getContextObject(stack), new Integer(value));
         }
     }
-    
+
     private static class DoubleSetter extends NumberSetter {
         public DoubleSetter(String variable) {
             super(variable);
         }
-        
+
         public void parse(String line, int startpos, Stack stack) throws IOException {
             double value = getDoubleValue(line, startpos);
             setValue(getContextObject(stack), new Double(value));
         }
     }
-    
+
     private static class WritingDirNumberSetter extends NumberSetter {
 
         public WritingDirNumberSetter(String variable) {
             super(variable);
         }
-        
+
         protected Object getContextObject(Stack stack) {
             if (stack.peek() instanceof AFMWritingDirectionMetrics) {
                 return (AFMWritingDirectionMetrics)stack.peek();
@@ -450,32 +450,32 @@
                 return wdm;
             }
         }
-        
+
     }
-    
+
     private static class WritingDirDoubleSetter extends WritingDirNumberSetter {
 
         public WritingDirDoubleSetter(String variable) {
             super(variable);
         }
-        
+
         public void parse(String line, int startpos, Stack stack) throws IOException {
             double value = getDoubleValue(line, startpos);
             setValue(getContextObject(stack), new Double(value));
         }
     }
-    
+
     private static class BooleanSetter extends AbstractValueHandler {
         private String method;
-        
+
         public BooleanSetter(String variable) {
             this.method = "set" + variable.substring(2); //Cut "Is" in front
         }
-        
+
         protected Object getContextObject(Stack stack) {
             return (AFMFile)stack.peek();
         }
-        
+
         public void parse(String line, int startpos, Stack stack) throws IOException {
             Boolean b = getBooleanValue(line, startpos);
             //Uses Java Beans API
@@ -489,13 +489,13 @@
             }
         }
     }
-    
+
     private static class WritingDirBooleanSetter extends BooleanSetter {
 
         public WritingDirBooleanSetter(String variable) {
             super(variable);
         }
-        
+
         protected Object getContextObject(Stack stack) {
             if (stack.peek() instanceof AFMWritingDirectionMetrics) {
                 return (AFMWritingDirectionMetrics)stack.peek();
@@ -509,13 +509,13 @@
                 return wdm;
             }
         }
-        
+
     }
-    
+
     private static class FontBBox extends AbstractValueHandler {
         public void parse(String line, int startpos, Stack stack) throws IOException {
             Rectangle rect = parseBBox(line, startpos);
-            
+
             AFMFile afm = (AFMFile)stack.peek();
             afm.setFontBBox(rect);
         }
@@ -523,20 +523,20 @@
         protected Rectangle parseBBox(String line, int startpos) {
             Rectangle rect = new Rectangle();
             int endpos;
-            
+
             endpos = findValue(line, startpos);
             rect.x = Integer.parseInt(line.substring(startpos, endpos));
             startpos = skipToNonWhiteSpace(line, endpos);
-            
+
             endpos = findValue(line, startpos);
             rect.y = Integer.parseInt(line.substring(startpos, endpos));
             startpos = skipToNonWhiteSpace(line, endpos);
-            
+
             endpos = findValue(line, startpos);
             int v = Integer.parseInt(line.substring(startpos, endpos));
             rect.width = v - rect.x;
             startpos = skipToNonWhiteSpace(line, endpos);
-            
+
             endpos = findValue(line, startpos);
             v = Integer.parseInt(line.substring(startpos, endpos));
             rect.height = v - rect.y;
@@ -544,11 +544,11 @@
             return rect;
         }
     }
-    
+
     private static class CharBBox extends FontBBox {
         public void parse(String line, int startpos, Stack stack) throws IOException {
             Rectangle rect = parseBBox(line, startpos);
-            
+
             AFMCharMetrics metrics = (AFMCharMetrics)stack.peek();
             metrics.setBBox(rect);
         }
@@ -561,7 +561,7 @@
             }
         }
     }
-    
+
     private static class IsCIDFont extends AbstractValueHandler {
         public void parse(String line, int startpos, Stack stack) throws IOException {
             if (getBooleanValue(line, startpos).booleanValue()) {
@@ -569,20 +569,20 @@
             }
         }
     }
-    
+
     private static class NotImplementedYet extends AbstractValueHandler {
         private String key;
-        
+
         public NotImplementedYet(String key) {
             this.key = key;
         }
-        
+
         public void parse(String line, int startpos, Stack stack) throws IOException {
             throw new IOException("Support for '" + key
                     + "' has not been implemented, yet! Font is not supported.");
         }
     }
-    
+
     private static class StartDirection extends AbstractValueHandler {
         public void parse(String line, int startpos, Stack stack) throws IOException {
             int index = getIntegerValue(line, startpos);
@@ -592,7 +592,7 @@
             stack.push(wdm);
         }
     }
-    
+
     private static class EndDirection extends AbstractValueHandler {
         public void parse(String line, int startpos, Stack stack) throws IOException {
             if (!(stack.pop() instanceof AFMWritingDirectionMetrics)) {
@@ -600,26 +600,26 @@
             }
         }
     }
-    
+
     private static class KPXHandler extends AbstractValueHandler {
         public void parse(String line, int startpos, Stack stack) throws IOException {
             AFMFile afm = (AFMFile)stack.peek();
             int endpos;
-            
+
             endpos = findValue(line, startpos);
             String name1 = line.substring(startpos, endpos);
             startpos = skipToNonWhiteSpace(line, endpos);
-            
+
             endpos = findValue(line, startpos);
             String name2 = line.substring(startpos, endpos);
             startpos = skipToNonWhiteSpace(line, endpos);
-            
+
             endpos = findValue(line, startpos);
             double kx = Double.parseDouble(line.substring(startpos, endpos));
             startpos = skipToNonWhiteSpace(line, endpos);
-            
+
             afm.addXKerning(name1, name2, kx);
         }
     }
-    
+
 }



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