diff options
-rw-r--r-- | src/java/org/apache/fop/afp/fonts/CharacterSet.java | 16 | ||||
-rw-r--r-- | status.xml | 3 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/afp/fonts/CharacterSet.java b/src/java/org/apache/fop/afp/fonts/CharacterSet.java index d54d478bc..e0c3b9c9a 100644 --- a/src/java/org/apache/fop/afp/fonts/CharacterSet.java +++ b/src/java/org/apache/fop/afp/fonts/CharacterSet.java @@ -108,12 +108,11 @@ public class CharacterSet { throw new IllegalArgumentException(msg); } - if (name.length() < MAX_NAME_LEN) { - this.name = StringUtils.rpad(name, ' ', MAX_NAME_LEN); - } else { - this.name = name; - } - this.codePage = codePage; + // the character set name must be 8 chars long + this.name = padName(name); + // the code page name must be 8 chars long + this.codePage = padName(codePage); + this.encoding = encoding; this.encoder = charsetType.getEncoder(encoding); this.accessor = accessor; @@ -121,6 +120,11 @@ public class CharacterSet { this.characterSetOrientations = new HashMap<String, CharacterSetOrientation>(4); } + // right pad short names with space + private String padName(String name) { + return name.length() < MAX_NAME_LEN ? StringUtils.rpad(name, ' ', MAX_NAME_LEN) : name; + } + /** * Add character set metric information for the different orientations * diff --git a/status.xml b/status.xml index 28c884774..d4a2e63bd 100644 --- a/status.xml +++ b/status.xml @@ -59,6 +59,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" fixes-bug="48955" due-to="Peter Hancock"> + Allow AFP font codepage names to be less than 8 chars + </action> <action context="Code" dev="PH" type="fix" fixes-bug="54075"> Fixed a regression </action> |