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 2003/03/27 11:06:16 UTC

cvs commit: xml-fop/src/java/org/apache/fop/fonts/truetype TTFFile.java

jeremias    2003/03/27 02:06:16

  Modified:    src/java/org/apache/fop/fonts/truetype TTFFile.java
  Log:
  Reduce debug output. A constant can be modified to enable more extensive log output.
  
  Revision  Changes    Path
  1.2       +11 -4     xml-fop/src/java/org/apache/fop/fonts/truetype/TTFFile.java
  
  Index: TTFFile.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fonts/truetype/TTFFile.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TTFFile.java	11 Mar 2003 13:05:23 -0000	1.1
  +++ TTFFile.java	27 Mar 2003 10:06:16 -0000	1.2
  @@ -72,6 +72,9 @@
       static final int MAX_CHAR_CODE = 255;
       static final int ENC_BUF_SIZE = 1024;
   
  +    /** Set to true to get even more debug output than with level DEBUG */
  +    public static final boolean TRACE_ENABLED = false;
  +
       private String encoding = "WinAnsiEncoding";    // Default encoding
   
       private short firstChar = 0;
  @@ -783,7 +786,9 @@
           int mtxSize = Math.max(numberOfGlyphs, nhmtx);
           mtxTab = new TTFMtxEntry[mtxSize];
   
  -        getLogger().debug("*** Widths array: \n");
  +        if (TRACE_ENABLED) {
  +            getLogger().debug("*** Widths array: \n");
  +        }
           for (int i = 0; i < mtxSize; i++) {
               mtxTab[i] = new TTFMtxEntry();
           }
  @@ -791,9 +796,11 @@
               mtxTab[i].setWx(in.readTTFUShort());
               mtxTab[i].setLsb(in.readTTFUShort());
   
  -            if (getLogger().isDebugEnabled()) {
  -                getLogger().debug("   width[" + i + "] = "
  -                    + convertTTFUnit2PDFUnit(mtxTab[i].getWx()) + ";");
  +            if (TRACE_ENABLED) {
  +                if (getLogger().isDebugEnabled()) {
  +                    getLogger().debug("   width[" + i + "] = "
  +                        + convertTTFUnit2PDFUnit(mtxTab[i].getWx()) + ";");
  +                }
               }
           }
   
  
  
  

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