Code Duplication    Length = 25-25 lines in 2 locations

lib/FPDF/src/font/makefont/makefont.php 1 location

@@ 10-34 (lines=25) @@
7
* Author:  Olivier PLATHEY                                                     *
8
*******************************************************************************/
9
10
function ReadMap($enc)
11
{
12
	//Read a map file
13
	$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
14
	$a=file($file);
15
	if(empty($a))
16
		die('<b>Error:</b> encoding not found: '.$enc);
17
	$cc2gn=array();
18
	foreach($a as $l)
19
	{
20
		if($l[0]=='!')
21
		{
22
			$e=preg_split('/[ \\t]+/',rtrim($l));
23
			$cc=hexdec(substr($e[0],1));
24
			$gn=$e[2];
25
			$cc2gn[$cc]=$gn;
26
		}
27
	}
28
	for($i=0;$i<=255;$i++)
29
	{
30
		if(!isset($cc2gn[$i]))
31
			$cc2gn[$i]='.notdef';
32
	}
33
	return $cc2gn;
34
}
35
36
function ReadAFM($file, &$map)
37
{

ufpdf/font/makefont/makefont.php 1 location

@@ 10-34 (lines=25) @@
7
* Author:  Olivier PLATHEY                                                     *
8
*******************************************************************************/
9
10
function ReadMap($enc)
11
{
12
	//Read a map file
13
	$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
14
	$a=file($file);
15
	if(empty($a))
16
		die('<b>Error:</b> encoding not found: '.$enc);
17
	$cc2gn=array();
18
	foreach($a as $l)
19
	{
20
		if($l[0]=='!')
21
		{
22
			$e=preg_split('/[ \\t]+/',rtrim($l));
23
			$cc=hexdec(substr($e[0],1));
24
			$gn=$e[2];
25
			$cc2gn[$cc]=$gn;
26
		}
27
	}
28
	for($i=0;$i<=255;$i++)
29
	{
30
		if(!isset($cc2gn[$i]))
31
			$cc2gn[$i]='.notdef';
32
	}
33
	return $cc2gn;
34
}
35
36
function ReadAFM($file, &$map)
37
{