ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

ja-pdf.patch

Yuki Sonoda, 2011-03-06 12:29 pm

Download (1.7 kB)

 
b/vendor/plugins/rfpdf/lib/rfpdf/japanese.rb
36 36
# module.
37 37

  
38 38
module PDF_Japanese
39

  
39
  CONTROL_CHARACTERS = (0x00...0x20).inject({}){|map, c| map[c.chr] = 278; map }.freeze
40 40
  SJIS_widths={' ' => 278, '!' => 299, '"' => 353, '#' => 614, '$' => 614, '%' => 721, '&' => 735, '\'' => 216, 
41 41
  	'(' => 323, ')' => 323, '*' => 449, '+' => 529, ',' => 219, '-' => 306, '.' => 219, '/' => 453, '0' => 614, '1' => 614, 
42 42
  	'2' => 614, '3' => 614, '4' => 614, '5' => 614, '6' => 614, '7' => 614, '8' => 614, '9' => 614, ':' => 219, ';' => 219, 
......
46 46
  	'Z' => 578, '[' => 316, '\\' => 614, ']' => 316, '^' => 529, '_' => 500, '`' => 387, 'a' => 509, 'b' => 566, 'c' => 478, 
47 47
  	'd' => 565, 'e' => 503, 'f' => 337, 'g' => 549, 'h' => 580, 'i' => 275, 'j' => 266, 'k' => 544, 'l' => 276, 'm' => 854, 
48 48
  	'n' => 579, 'o' => 550, 'p' => 578, 'q' => 566, 'r' => 410, 's' => 444, 't' => 340, 'u' => 575, 'v' => 512, 'w' => 760, 
49
  	'x' => 503, 'y' => 529, 'z' => 453, '{' => 326, '|' => 380, '}' => 326, '~' => 387}
49
  	'x' => 503, 'y' => 529, 'z' => 453, '{' => 326, '|' => 380, '}' => 326, '~' => 387}.merge(CONTROL_CHARACTERS).freeze
50 50

  
51 51
  def AddCIDFont(family,style,name,cw,cMap,registry)  	
52 52
    fontkey=family.downcase+style.upcase