summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-21 06:17:06 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-21 06:17:06 +0000
commitf49bbf48e7679f20c1d704b677b07b54b236ce38 (patch)
tree507fe6410b2eb9362d9f672a4c246f8518fef2ff /vendor
parent891ed84fe39e97f27f6cb86d93238c23ef944e9b (diff)
downloadredmine-f49bbf48e7679f20c1d704b677b07b54b236ce38.tar.gz
redmine-f49bbf48e7679f20c1d704b677b07b54b236ce38.zip
Merged r5183 from trunk.
Fix an internal server error on formatting an issue as a PDF in Japanese. Contributed by Yuki Sonoda. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5184 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/rfpdf/lib/rfpdf/japanese.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb b/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb
index 4e611a6f6..f87614818 100644
--- a/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb
+++ b/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb
@@ -36,7 +36,7 @@
# module.
module PDF_Japanese
-
+ CONTROL_CHARACTERS = (0x00...0x20).inject({}){|map, c| map[c.chr] = 278; map }.freeze
SJIS_widths={' ' => 278, '!' => 299, '"' => 353, '#' => 614, '$' => 614, '%' => 721, '&' => 735, '\'' => 216,
'(' => 323, ')' => 323, '*' => 449, '+' => 529, ',' => 219, '-' => 306, '.' => 219, '/' => 453, '0' => 614, '1' => 614,
'2' => 614, '3' => 614, '4' => 614, '5' => 614, '6' => 614, '7' => 614, '8' => 614, '9' => 614, ':' => 219, ';' => 219,
@@ -46,7 +46,7 @@ module PDF_Japanese
'Z' => 578, '[' => 316, '\\' => 614, ']' => 316, '^' => 529, '_' => 500, '`' => 387, 'a' => 509, 'b' => 566, 'c' => 478,
'd' => 565, 'e' => 503, 'f' => 337, 'g' => 549, 'h' => 580, 'i' => 275, 'j' => 266, 'k' => 544, 'l' => 276, 'm' => 854,
'n' => 579, 'o' => 550, 'p' => 578, 'q' => 566, 'r' => 410, 's' => 444, 't' => 340, 'u' => 575, 'v' => 512, 'w' => 760,
- 'x' => 503, 'y' => 529, 'z' => 453, '{' => 326, '|' => 380, '}' => 326, '~' => 387}
+ 'x' => 503, 'y' => 529, 'z' => 453, '{' => 326, '|' => 380, '}' => 326, '~' => 387}.merge(CONTROL_CHARACTERS).freeze
def AddCIDFont(family,style,name,cw,cMap,registry)
fontkey=family.downcase+style.upcase