Hi Jeremias,
As far as I know any parsed PFM file (Type 1 font) with a dfCharset=2 is using ExpertSubset encoding
and similarly dfCharset=1 is Expert encoding).
The problem before was that FOP was only able to detect Expert and ExpertSubset encoding types but
was not able to provide the glyph mappings. I have now spent some time providing support for these
and from the testing I have done it seems to work fine, so unless there are any objections I will
add the detection back in and commit my changes after the weekend.
Adrian.
[EMAIL PROTECTED] wrote:
Author: jeremias
Date: Thu Nov 15 05:28:58 2007
New Revision: 595297
URL: http://svn.apache.org/viewvc?rev=595297&view=rev
Log:
Bugzilla #43143:
Had to remove the Expert(Subset) Encoding detection as this caused problems
with a barcode font that used dfCharset=2 but was not using ExpertSubset
encoding. To detect Expert(Subset)Encoding, the AFM needs to be parsed. And
since we don't support that encoding, yet, the fallback to WinAnsiEncoding
should work well enough.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java?rev=595297&r1=595296&r2=595297&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java Thu
Nov 15 05:28:58 2007
@@ -28,6 +28,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.apache.fop.fonts.Glyphs;
/**
@@ -297,22 +298,24 @@
* @return The name of the charset.
*/
public String getCharSetName() {
+ //TODO Had to remove the detection for Expert(Subset) encoding. The
PFM is not suitable
+ //for detecting these character sets. We have to parse the AFM for
that.
switch (dfCharSet) {
case 0:
return "WinAnsi"; // AKA ISOAdobe
- case 1:
- return "Expert";
case 2:
if ("Symbol".equals(getPostscriptName())) {
return "Symbol";
- } else {
- return "ExpertSubset";
}
+ break;
case 128:
return "Shift-JIS (Japanese)";
default:
- return "Unknown (" + dfCharSet + ", 0x" + Integer.toHexString(dfCharSet) +
")";
+ log.warn("Unknown charset detected (" + dfCharSet
+ + ", 0x" + Integer.toHexString(dfCharSet)
+ + "). Trying fallback to WinAnsi.");
}
+ return "WinAnsi";
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]