Code Duplication    Length = 24-24 lines in 2 locations

fpdf/chinese.php 1 location

@@ 96-119 (lines=24) @@
93
    return parent::GetStringWidth($s);
94
}
95
96
function GetMBStringWidth($s)
97
{
98
  //Multi-byte version of GetStringWidth()
99
  $l=0;
100
  $cw=&$this->CurrentFont['cw'];
101
  $nb=strlen($s);
102
  $i=0;
103
  while($i<$nb)
104
  {
105
    $c=$s[$i];
106
    if(ord($c)<128)
107
    {
108
      $l+=$cw[$c];
109
      $i++;
110
    }
111
    else
112
    {
113
      $l+=1000;
114
      $i+=2;
115
    }
116
  }
117
118
  return $l*$this->FontSize/1000;
119
}
120
121
function MultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
122
{

fpdf/korean.php 1 location

@@ 66-89 (lines=24) @@
63
    return parent::GetStringWidth($s);
64
}
65
66
function GetMBStringWidth($s)
67
{
68
  //Multi-byte version of GetStringWidth()
69
  $l=0;
70
  $cw=&$this->CurrentFont['cw'];
71
  $nb=strlen($s);
72
  $i=0;
73
  while($i<$nb)
74
  {
75
    $c=$s[$i];
76
    if(ord($c)<128)
77
    {
78
      $l+=$cw[$c];
79
      $i++;
80
    }
81
    else
82
    {
83
      $l+=1000;
84
      $i+=2;
85
    }
86
  }
87
88
  return $l*$this->FontSize/1000;
89
}
90
91
function MultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
92
{