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 cb...@apache.org on 2009/06/09 11:29:35 UTC
svn commit: r782928 - in /xmlgraphics/fop/trunk:
src/java/org/apache/fop/fonts/type1/PFMFile.java status.xml
Author: cbowditch
Date: Tue Jun 9 09:29:32 2009
New Revision: 782928
URL: http://svn.apache.org/viewvc?rev=782928&view=rev
Log:
bug fix: support PFM Files with no extent table
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java
xmlgraphics/fop/trunk/status.xml
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=782928&r1=782927&r2=782928&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 Tue Jun 9 09:29:32 2009
@@ -481,7 +481,13 @@
* @return The width of a character.
*/
public int getCharWidth(short which) {
- return extentTable[which - dfFirstChar];
+ if (extentTable != null) {
+ return extentTable[which - dfFirstChar];
+ } else {
+ //Fixed-width font (PFM may have no extent table)
+ //we'll just use the average width
+ return this.dfAvgWidth;
+ }
}
}
Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=782928&r1=782927&r2=782928&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Tue Jun 9 09:29:32 2009
@@ -58,6 +58,9 @@
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Code" dev="CB" type="fix">
+ Bugfix: support PFM Files with no extent table.
+ </action>
<action context="Code" dev="AD" type="fix" fixes-bug="46960">
Bugfix: previously retrieved markers were not cleared if the new marker was empty.
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org