aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorRobert Meyer <rmeyer@apache.org>2013-10-21 14:54:09 +0000
committerRobert Meyer <rmeyer@apache.org>2013-10-21 14:54:09 +0000
commit480edcfb80906fbad780060093c7e943b91f8430 (patch)
tree4ea40568da3705e7ecb6845293952d6919dd40dd /src/java/org/apache/fop
parent39e331287690a4ba25b19cbf1d9af413c3e81aca (diff)
downloadxmlgraphics-fop-480edcfb80906fbad780060093c7e943b91f8430.tar.gz
xmlgraphics-fop-480edcfb80906fbad780060093c7e943b91f8430.zip
FOP-2299: Non Unicode named glyphs not loaded for Type1 fonts
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1534195 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/fonts/type1/AFMFile.java2
-rw-r--r--src/java/org/apache/fop/fonts/type1/Type1FontLoader.java9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fonts/type1/AFMFile.java b/src/java/org/apache/fop/fonts/type1/AFMFile.java
index f6bc3b163..2aa718ea0 100644
--- a/src/java/org/apache/fop/fonts/type1/AFMFile.java
+++ b/src/java/org/apache/fop/fonts/type1/AFMFile.java
@@ -319,7 +319,7 @@ public class AFMFile {
*/
public void addCharMetrics(AFMCharMetrics metrics) {
String name = metrics.getCharName();
- if (metrics.getUnicodeSequence() == null) {
+ if (metrics.getUnicodeSequence() == null && name.equals(".notdef")) {
//Ignore as no Unicode assignment is possible
return;
}
diff --git a/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java b/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
index 853e23eb5..dddf2a3a3 100644
--- a/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
+++ b/src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
@@ -393,10 +393,7 @@ public class Type1FontLoader extends FontLoader {
List<AFMCharMetrics> chars = afm.getCharMetrics();
for (AFMCharMetrics charMetrics : chars) {
if (charMetrics.getCharCode() >= 0) {
- String u = charMetrics.getUnicodeSequence();
- if (u != null && u.length() == 1) {
- mappingCount++;
- }
+ mappingCount++;
}
}
// ...and now build the table.
@@ -409,6 +406,10 @@ public class Type1FontLoader extends FontLoader {
String unicodes = charMetrics.getUnicodeSequence();
if (unicodes == null) {
log.info("No Unicode mapping for glyph: " + charMetrics);
+ table[idx] = charMetrics.getCharCode();
+ idx++;
+ table[idx] = charMetrics.getCharCode();
+ idx++;
} else if (unicodes.length() == 1) {
table[idx] = charMetrics.getCharCode();
idx++;