Code Duplication    Length = 9-10 lines in 4 locations

fpdf/chinese.php 2 locations

@@ 59-67 (lines=9) @@
56
  $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
57
}
58
59
function AddBig5hwFont($family='PMingLiU',$name='MSungStd-Light-Acro')
60
{
61
  //Add Big5 font with half-witdh Latin
62
  for($i=32;$i<=126;$i++)
63
    $cw[chr($i)]=500;
64
  $CMap='ETen-B5-H';
65
  $registry=array('ordering'=>'CNS1','supplement'=>0);
66
  $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
67
}
68
69
function AddGBFont($family='GB',$name='STSongStd-Light-Acro')
70
{
@@ 78-86 (lines=9) @@
75
  $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
76
}
77
78
function AddGBhwFont($family='GB-hw',$name='STSongStd-Light-Acro')
79
{
80
  //Add GB font with half-width Latin
81
  for($i=32;$i<=126;$i++)
82
    $cw[chr($i)]=500;
83
  $CMap='GBK-EUC-H';
84
  $registry=array('ordering'=>'GB1','supplement'=>2);
85
  $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
86
}
87
88
function GetStringWidth($s)
89
{

fpdf/japanese.php 1 location

@@ 48-57 (lines=10) @@
45
  $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
46
}
47
48
function AddSJIShwFont($family='SJIS-hw')
49
{
50
  //Add SJIS font with half-width Latin
51
  $name='KozMinPro-Regular-Acro';
52
  for($i=32;$i<=126;$i++)
53
    $cw[chr($i)]=500;
54
  $CMap='90ms-RKSJ-H';
55
  $registry=array('ordering'=>'Japan1','supplement'=>2);
56
  $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
57
}
58
59
function GetStringWidth($s)
60
{

fpdf/korean.php 1 location

@@ 48-56 (lines=9) @@
45
  $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
46
}
47
48
function AddUHChwFont($family='UHC-hw',$name='HYSMyeongJoStd-Medium-Acro')
49
{
50
  //Add UHC font with half-witdh Latin
51
  for($i=32;$i<=126;$i++)
52
    $cw[chr($i)]=500;
53
  $CMap='KSCms-UHC-HW-H';
54
  $registry=array('ordering'=>'Korea1','supplement'=>1);
55
  $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
56
}
57
58
function GetStringWidth($s)
59
{