aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/ps/PSTextPainter.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2012-04-05 16:19:19 +0000
committerVincent Hennebert <vhennebert@apache.org>2012-04-05 16:19:19 +0000
commit502152b4779d4b970148a074e741754828fcc89a (patch)
tree809eb271a8251dcb69dda9679eaeb09398d232d0 /src/java/org/apache/fop/render/ps/PSTextPainter.java
parent7c8f02c57302d672fe4d0a8fc5332af6d9f0e610 (diff)
parent73c7b4470f8793bcbf5f1ae795a72fdb7d4455b3 (diff)
downloadxmlgraphics-fop-502152b4779d4b970148a074e741754828fcc89a.tar.gz
xmlgraphics-fop-502152b4779d4b970148a074e741754828fcc89a.zip
Merged changes from trunk up to revision 1306814
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript@1309921 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/ps/PSTextPainter.java')
-rw-r--r--src/java/org/apache/fop/render/ps/PSTextPainter.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/render/ps/PSTextPainter.java b/src/java/org/apache/fop/render/ps/PSTextPainter.java
index caa778ae2..822a9a66d 100644
--- a/src/java/org/apache/fop/render/ps/PSTextPainter.java
+++ b/src/java/org/apache/fop/render/ps/PSTextPainter.java
@@ -292,10 +292,10 @@ public class PSTextPainter extends NativeTextPainter {
public boolean isFontChanging(Font f, char mapped) {
if (f != getCurrentFont()) {
- int encoding = mapped / 256;
- if (encoding != getCurrentFontEncoding()) {
- return true; //Font is changing
- }
+ return true;
+ }
+ if (mapped / 256 != getCurrentFontEncoding()) {
+ return true;
}
return false; //Font is the same
}
@@ -443,7 +443,8 @@ public class PSTextPainter extends NativeTextPainter {
if (multiByte) {
sb.append(HexEncoder.encode(mapped));
} else {
- PSGenerator.escapeChar(mapped, sb);
+ char codepoint = (char) (mapped % 256);
+ PSGenerator.escapeChar(codepoint, sb);
}
}
sb.append(multiByte ? '>' : ')');