]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix: Disabled setting widths from AFM since we're using WinAnsiEncoding internally...
authorJeremias Maerki <jeremias@apache.org>
Fri, 29 Feb 2008 14:03:01 +0000 (14:03 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 29 Feb 2008 14:03:01 +0000 (14:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@632321 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/type1/Type1FontLoader.java

index 910ee82cc7144f956c4d6c3125e970fff08ca138..473ee9a08a6484bf5e01c2bfac2929d9b7f418c7 100644 (file)
@@ -108,6 +108,11 @@ public class Type1FontLoader extends FontLoader {
             throw new java.io.FileNotFoundException(
                     "Neither an AFM nor a PFM file was found for " + this.fontFileURI);
         }
+        if (pfm == null) {      
+            //Cannot do without the PFM for now         
+            throw new java.io.FileNotFoundException(    
+                    "No PFM file was found for " + this.fontFileURI);   
+        }
         buildFont(afm, pfm);
         this.loaded = true;
     }
@@ -266,8 +271,11 @@ public class Type1FontLoader extends FontLoader {
             returnFont.setCapHeight(returnFont.getAscender());
         }
         
+        /* DISABLED because of mismatch with our using WinAnsiEncoding and the AFM
+        delivering the font's default encoding.
         if (afm != null) {
             //TODO returnFont.setFlags(flags);
+             
             returnFont.setFirstChar(afm.getFirstChar());
             returnFont.setLastChar(afm.getLastChar());
             Iterator iter = afm.getCharMetrics().iterator();
@@ -278,7 +286,7 @@ public class Type1FontLoader extends FontLoader {
                 }
             }
             returnFont.replaceKerningMap(afm.createXKerningMapEncoded());
-        } else {
+        } else {*/
             returnFont.setFlags(pfm.getFlags());
             returnFont.setFirstChar(pfm.getFirstChar());
             returnFont.setLastChar(pfm.getLastChar());
@@ -286,7 +294,7 @@ public class Type1FontLoader extends FontLoader {
                 singleFont.setWidth(i, pfm.getCharWidth(i));
             }
             returnFont.replaceKerningMap(pfm.getKerning());
-        }
+        //}
     }
 
     private CodePointMapping buildCustomEncoding(String encodingName, AFMFile afm) {