]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fixed checkstyle issues: tabs and trailing spaces
authorVincent Hennebert <vhennebert@apache.org>
Wed, 9 Jan 2008 11:02:08 +0000 (11:02 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Wed, 9 Jan 2008 11:02:08 +0000 (11:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@610337 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/java2d/CustomFontMetricsMapper.java
src/java/org/apache/fop/render/java2d/FontSetup.java

index 968ed7b7194f0894e40750b7ec2009e5f594b0b1..208bc303a424ca10bf77359dbfd33be854e244a9 100644 (file)
@@ -64,7 +64,7 @@ public class CustomFontMetricsMapper extends Typeface implements FontMetricsMapp
      * @throws IOException
      */
     public CustomFontMetricsMapper(final CustomFont fontMetrics)
-       throws FontFormatException, IOException {
+            throws FontFormatException, IOException {
         this.typeface = fontMetrics;
         initialize(fontMetrics.getEmbedFileSource());
     }
@@ -77,13 +77,13 @@ public class CustomFontMetricsMapper extends Typeface implements FontMetricsMapp
      * @throws IOException
      */
     public CustomFontMetricsMapper(final LazyFont fontMetrics, final Source fontSource)
-               throws FontFormatException, IOException {
+            throws FontFormatException, IOException {
         this.typeface = fontMetrics;
         initialize(fontSource);
     }
 
     private static final int TYPE1_FONT = 1; //Defined in Java 1.5
-    
+
     /**
      * Loads the java.awt.Font
      * @param source
index 6cdf01521df36a7eaf0a56340c28c150f9c63b3a..7523355218108c6558b1c674e7135c2ca1d14570 100644 (file)
@@ -50,18 +50,18 @@ public class FontSetup {
 
     /** logging instance */
     protected static Log log = LogFactory.getLog(FontSetup.class);
-    
+
     private static final int LAST_PREDEFINED_FONT_NUMBER = 14;
 
     private static final Set HARDCODED_FONT_NAMES;
-    
+
     static {
         HARDCODED_FONT_NAMES = new java.util.HashSet();
         HARDCODED_FONT_NAMES.add("any");
         HARDCODED_FONT_NAMES.add("sans-serif");
         HARDCODED_FONT_NAMES.add("serif");
         HARDCODED_FONT_NAMES.add("monospace");
-        
+
         HARDCODED_FONT_NAMES.add("Helvetica");
         HARDCODED_FONT_NAMES.add("Times");
         HARDCODED_FONT_NAMES.add("Courier");
@@ -71,7 +71,7 @@ public class FontSetup {
         HARDCODED_FONT_NAMES.add("Times-Roman");
         HARDCODED_FONT_NAMES.add("Computer-Modern-Typewriter");
     }
-    
+
     /**
      * Sets up the font info object.
      *
@@ -85,7 +85,7 @@ public class FontSetup {
      */
     public static void setup(FontInfo fontInfo, List configuredFontList,
             FontResolver resolver, Graphics2D graphics) {
-       FontMetricsMapper metric;
+        FontMetricsMapper metric;
         int normal, bold, bolditalic, italic;
 
         /*
@@ -218,32 +218,32 @@ public class FontSetup {
         fontInfo.addFontProperties("F8", "Times Roman", "italic", Font.WEIGHT_BOLD);
         fontInfo.addFontProperties("F9", "Computer-Modern-Typewriter",
                                    "normal", Font.WEIGHT_NORMAL);
-        
-       int lastNum = configureInstalledAWTFonts(fontInfo, graphics, LAST_PREDEFINED_FONT_NUMBER + 1);
-       addConfiguredFonts(fontInfo, configuredFontList, resolver, lastNum++);
+
+        int lastNum = configureInstalledAWTFonts(fontInfo, graphics, LAST_PREDEFINED_FONT_NUMBER + 1);
+        addConfiguredFonts(fontInfo, configuredFontList, resolver, lastNum++);
     }
 
-    private static int configureInstalledAWTFonts(FontInfo fontInfo, Graphics2D graphics, 
+    private static int configureInstalledAWTFonts(FontInfo fontInfo, Graphics2D graphics,
             int startNumber) {
         int num = startNumber;
         GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        
+
         java.awt.Font[] fonts = env.getAllFonts();
         for (int i = 0; i < fonts.length; i++) {
             java.awt.Font f = fonts[i];
             if (HARDCODED_FONT_NAMES.contains(f.getName())) {
                 continue; //skip
             }
-            
+
             if (log.isTraceEnabled()) {
-                log.trace("AWT Font: " + f.getFontName() 
-                        + ", family: " + f.getFamily() 
-                        + ", PS: " + f.getPSName() 
+                log.trace("AWT Font: " + f.getFontName()
+                        + ", family: " + f.getFamily()
+                        + ", PS: " + f.getPSName()
                         + ", Name: " + f.getName()
                         + ", Angle: " + f.getItalicAngle()
                         + ", Style: " + f.getStyle());
             }
-            
+
             String searchName = FontUtil.stripWhiteSpace(f.getName()).toLowerCase();
             String guessedStyle = FontUtil.guessStyle(searchName);
             int guessedWeight = FontUtil.guessWeight(searchName);
@@ -252,7 +252,7 @@ public class FontSetup {
             String fontKey = "F" + num;
             int style = convertToAWTFontStyle(guessedStyle, guessedWeight);
             addFontMetricsMapper(fontInfo, f.getName(), fontKey, graphics, style);
-            
+
             //Register appropriate font triplets matching the font. Two different strategies:
             //Example: "Arial Bold", normal, normal
             addFontTriplet(fontInfo, f.getName(),
@@ -320,12 +320,12 @@ public class FontSetup {
                     fontInfo.addFontProperties(internalName, triplet);
                 }
             } catch (Exception e) {
-                log.warn("Unable to load custom font from file '" + fontFile + "'", e);
+                log.warn("Unable to load custom font from file '" + fontFile + "'", e);
             }
         }
     }
 
-    
+
     private static void addFontTriplet(FontInfo fontInfo, String fontName, String fontStyle,
             int fontWeight, String fontKey) {
         FontTriplet triplet = FontInfo.createFontKey(fontName, fontStyle, fontWeight);
@@ -334,7 +334,7 @@ public class FontSetup {
 
     private static void addFontMetricsMapper(FontInfo fontInfo, String family, String fontKey,
             Graphics2D graphics, int style) {
-       FontMetricsMapper metric = new SystemFontMetricsMapper(family, style, graphics);
+        FontMetricsMapper metric = new SystemFontMetricsMapper(family, style, graphics);
         fontInfo.addMetrics(fontKey, metric);
     }
 
@@ -348,6 +348,6 @@ public class FontSetup {
         }
         return style;
     }
-    
+
 }