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/02/29 15:03:07 UTC
svn commit: r632321 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
Author: jeremias
Date: Fri Feb 29 06:03:01 2008
New Revision: 632321
URL: http://svn.apache.org/viewvc?rev=632321&view=rev
Log:
Bugfix: Disabled setting widths from AFM since we're using WinAnsiEncoding internally but the AFM delivers the character widths using the font's native encoding which causes problems with some characters.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java?rev=632321&r1=632320&r2=632321&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java Fri Feb 29 06:03:01 2008
@@ -108,6 +108,11 @@
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 @@
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 @@
}
}
returnFont.replaceKerningMap(afm.createXKerningMapEncoded());
- } else {
+ } else {*/
returnFont.setFlags(pfm.getFlags());
returnFont.setFirstChar(pfm.getFirstChar());
returnFont.setLastChar(pfm.getLastChar());
@@ -286,7 +294,7 @@
singleFont.setWidth(i, pfm.getCharWidth(i));
}
returnFont.replaceKerningMap(pfm.getKerning());
- }
+ //}
}
private CodePointMapping buildCustomEncoding(String encodingName, AFMFile afm) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org