Merged revisions 3315-3327 via svnmerge from
file:///home/developper/svn/phpcompta/branches/rel510 ........ r3316 | danydb | 2010-06-18 20:20:11 +0200 (Fri, 18 Jun 2010) | 1 line Add the receipt number for the CBC_OL ........ r3317 | danydb | 2010-06-18 20:37:49 +0200 (Fri, 18 Jun 2010) | 1 line truncate the table import_tmp ........ r3318 | danydb | 2010-06-18 20:48:49 +0200 (Fri, 18 Jun 2010) | 2 lines Typo ........ r3319 | danydb | 2010-06-18 21:54:58 +0200 (Fri, 18 Jun 2010) | 2 lines typo ........ r3323 | danydb | 2010-06-19 12:59:28 +0200 (Sat, 19 Jun 2010) | 1 line Card ordered by name ........ r3324 | danydb | 2010-06-19 13:12:36 +0200 (Sat, 19 Jun 2010) | 1 line Card ordered by name, add SQL script ........ r3325 | danydb | 2010-06-19 13:21:11 +0200 (Sat, 19 Jun 2010) | 2 lines Bug sql order when not unlimited size ........ r3326 | danydb | 2010-06-19 21:03:49 +0200 (Sat, 19 Jun 2010) | 1 line Fix bug in the verification of BILAN ........ r3327 | danydb | 2010-06-20 21:52:57 +0200 (Sun, 20 Jun 2010) | 1 line Update PDF class to TFPDF ........
This commit is contained in:
parent
96d7deb4e4
commit
dabe37bf51
92 changed files with 1334 additions and 83055 deletions
7
include/tfpdf/font/courier.php
Normal file
7
include/tfpdf/font/courier.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
for($i=0;$i<=255;$i++)
|
||||
$fpdf_charwidths['courier'][chr($i)]=600;
|
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier'];
|
||||
?>
|
||||
15
include/tfpdf/font/helvetica.php
Normal file
15
include/tfpdf/font/helvetica.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['helvetica']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
15
include/tfpdf/font/helveticab.php
Normal file
15
include/tfpdf/font/helveticab.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['helveticaB']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
15
include/tfpdf/font/helveticabi.php
Normal file
15
include/tfpdf/font/helveticabi.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['helveticaBI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
15
include/tfpdf/font/helveticai.php
Normal file
15
include/tfpdf/font/helveticai.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['helveticaI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
15
include/tfpdf/font/symbol.php
Normal file
15
include/tfpdf/font/symbol.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['symbol']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
|
||||
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
|
||||
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
|
||||
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
|
||||
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
|
||||
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
|
||||
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
|
||||
?>
|
||||
15
include/tfpdf/font/times.php
Normal file
15
include/tfpdf/font/times.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['times']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
|
||||
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
|
||||
?>
|
||||
15
include/tfpdf/font/timesb.php
Normal file
15
include/tfpdf/font/timesb.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['timesB']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
|
||||
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
|
||||
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
15
include/tfpdf/font/timesbi.php
Normal file
15
include/tfpdf/font/timesbi.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['timesBI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
|
||||
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
15
include/tfpdf/font/timesi.php
Normal file
15
include/tfpdf/font/timesi.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['timesI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
|
||||
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
BIN
include/tfpdf/font/unifont/DejaVuSans-Bold.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSans-Bold.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSans-BoldOblique.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSans-BoldOblique.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSans-ExtraLight.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSans-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSans-Oblique.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSans-Oblique.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSans.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSans.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSansCondensed-Bold.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSansCondensed-Bold.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSansCondensed-BoldOblique.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSansCondensed-BoldOblique.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSansCondensed-Oblique.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSansCondensed-Oblique.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSansCondensed.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSansCondensed.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSansMono-Bold.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSansMono-Bold.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSansMono-BoldOblique.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSansMono-BoldOblique.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSansMono-Oblique.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSansMono-Oblique.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSansMono.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSansMono.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSerif-Bold.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSerif-Bold.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSerif-BoldItalic.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSerif-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSerif-Italic.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSerif-Italic.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSerif.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSerif.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSerifCondensed-Bold.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSerifCondensed-Bold.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSerifCondensed-BoldItalic.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSerifCondensed-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSerifCondensed-Italic.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSerifCondensed-Italic.ttf
Normal file
Binary file not shown.
BIN
include/tfpdf/font/unifont/DejaVuSerifCondensed.ttf
Normal file
BIN
include/tfpdf/font/unifont/DejaVuSerifCondensed.ttf
Normal file
Binary file not shown.
99
include/tfpdf/font/unifont/DejaVu_LICENSE.txt
Normal file
99
include/tfpdf/font/unifont/DejaVu_LICENSE.txt
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
|
||||
Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
|
||||
|
||||
Bitstream Vera Fonts Copyright
|
||||
------------------------------
|
||||
|
||||
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
|
||||
a trademark of Bitstream, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of the fonts accompanying this license ("Fonts") and associated
|
||||
documentation files (the "Font Software"), to reproduce and distribute the
|
||||
Font Software, including without limitation the rights to use, copy, merge,
|
||||
publish, distribute, and/or sell copies of the Font Software, and to permit
|
||||
persons to whom the Font Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright and trademark notices and this permission notice shall
|
||||
be included in all copies of one or more of the Font Software typefaces.
|
||||
|
||||
The Font Software may be modified, altered, or added to, and in particular
|
||||
the designs of glyphs or characters in the Fonts may be modified and
|
||||
additional glyphs or characters may be added to the Fonts, only if the fonts
|
||||
are renamed to names not containing either the words "Bitstream" or the word
|
||||
"Vera".
|
||||
|
||||
This License becomes null and void to the extent applicable to Fonts or Font
|
||||
Software that has been modified and is distributed under the "Bitstream
|
||||
Vera" names.
|
||||
|
||||
The Font Software may be sold as part of a larger software package but no
|
||||
copy of one or more of the Font Software typefaces may be sold by itself.
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
|
||||
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
|
||||
FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
|
||||
ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
|
||||
FONT SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the names of Gnome, the Gnome
|
||||
Foundation, and Bitstream Inc., shall not be used in advertising or
|
||||
otherwise to promote the sale, use or other dealings in this Font Software
|
||||
without prior written authorization from the Gnome Foundation or Bitstream
|
||||
Inc., respectively. For further information, contact: fonts at gnome dot
|
||||
org.
|
||||
|
||||
Arev Fonts Copyright
|
||||
------------------------------
|
||||
|
||||
Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the fonts accompanying this license ("Fonts") and
|
||||
associated documentation files (the "Font Software"), to reproduce
|
||||
and distribute the modifications to the Bitstream Vera Font Software,
|
||||
including without limitation the rights to use, copy, merge, publish,
|
||||
distribute, and/or sell copies of the Font Software, and to permit
|
||||
persons to whom the Font Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright and trademark notices and this permission notice
|
||||
shall be included in all copies of one or more of the Font Software
|
||||
typefaces.
|
||||
|
||||
The Font Software may be modified, altered, or added to, and in
|
||||
particular the designs of glyphs or characters in the Fonts may be
|
||||
modified and additional glyphs or characters may be added to the
|
||||
Fonts, only if the fonts are renamed to names not containing either
|
||||
the words "Tavmjong Bah" or the word "Arev".
|
||||
|
||||
This License becomes null and void to the extent applicable to Fonts
|
||||
or Font Software that has been modified and is distributed under the
|
||||
"Tavmjong Bah Arev" names.
|
||||
|
||||
The Font Software may be sold as part of a larger software package but
|
||||
no copy of one or more of the Font Software typefaces may be sold by
|
||||
itself.
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
|
||||
TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Tavmjong Bah shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Font Software without prior written authorization
|
||||
from Tavmjong Bah. For further information, contact: tavmjong @ free
|
||||
. fr.
|
||||
|
||||
$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $
|
||||
866
include/tfpdf/font/unifont/ttfonts.php
Normal file
866
include/tfpdf/font/unifont/ttfonts.php
Normal file
|
|
@ -0,0 +1,866 @@
|
|||
<?php
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* TTFontFile class *
|
||||
* *
|
||||
* This class is based on The ReportLab Open Source PDF library *
|
||||
* written in Python - http://www.reportlab.com/software/opensource/ *
|
||||
* together with ideas from the OpenOffice source code and others. *
|
||||
* *
|
||||
* Version: 1.02 *
|
||||
* Date: 2010-06-07 *
|
||||
* Author: Ian Back <ianb@bpm1.com> *
|
||||
* License: LGPL *
|
||||
* Copyright (c) Ian Back, 2010 *
|
||||
* This header must be retained in any redistribution or *
|
||||
* modification of the file. *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
// TrueType Font Glyph operators
|
||||
define("GF_WORDS",(1 << 0));
|
||||
define("GF_SCALE",(1 << 3));
|
||||
define("GF_MORE",(1 << 5));
|
||||
define("GF_XYSCALE",(1 << 6));
|
||||
define("GF_TWOBYTWO",(1 << 7));
|
||||
|
||||
|
||||
|
||||
class TTFontFile {
|
||||
|
||||
var $_pos;
|
||||
var $numTables;
|
||||
var $searchRange;
|
||||
var $entrySelector;
|
||||
var $rangeShift;
|
||||
var $tables;
|
||||
var $otables;
|
||||
var $filename;
|
||||
var $fh;
|
||||
var $hmetrics;
|
||||
var $glyphPos;
|
||||
var $charToGlyph;
|
||||
var $ascent;
|
||||
var $descent;
|
||||
var $name;
|
||||
var $familyName;
|
||||
var $styleName;
|
||||
var $fullName;
|
||||
var $uniqueFontID;
|
||||
var $unitsPerEm;
|
||||
var $bbox;
|
||||
var $capHeight;
|
||||
var $stemV;
|
||||
var $italicAngle;
|
||||
var $flags;
|
||||
var $underlinePosition;
|
||||
var $underlineThickness;
|
||||
var $charWidths;
|
||||
var $defaultWidth;
|
||||
var $maxStrLenRead;
|
||||
|
||||
function TTFontFile() {
|
||||
$this->maxStrLenRead = 200000; // Maximum size of glyf table to read in as string (otherwise reads each glyph from file)
|
||||
}
|
||||
|
||||
|
||||
function getMetrics($file, $presubset=0) {
|
||||
$this->filename = $file;
|
||||
$this->fh = fopen($file,'rb') or die('Can\'t open file ' . $file);
|
||||
$this->_pos = 0;
|
||||
$this->charWidths = array();
|
||||
$this->hmetrics = array();
|
||||
$this->glyphPos = array();
|
||||
$this->charToGlyph = array();
|
||||
$this->tables = array();
|
||||
$this->otables = array();
|
||||
$this->ascent = 0;
|
||||
$this->descent = 0;
|
||||
if ($presubset) { $this->skip(4); }
|
||||
else { $this->readHeader(); }
|
||||
$this->readTableDirectory($presubset);
|
||||
$this->extractInfo($presubset);
|
||||
fclose($this->fh);
|
||||
}
|
||||
|
||||
function readHeader() {
|
||||
// read the sfnt header at the current position
|
||||
$this->version = $version = $this->read_ulong();
|
||||
if ($version==0x4F54544F)
|
||||
die("Postscript outlines are not supported");
|
||||
if ($version==0x74746366)
|
||||
die("TTC Font collections are not supported");
|
||||
if (!in_array($version, array(0x00010000,0x74727565)))
|
||||
die("Not a TrueType font: version=".$version);
|
||||
return true;
|
||||
}
|
||||
|
||||
function readTableDirectory($presubset=1) {
|
||||
$this->numTables = $this->read_ushort();
|
||||
$this->searchRange = $this->read_ushort();
|
||||
$this->entrySelector = $this->read_ushort();
|
||||
$this->rangeShift = $this->read_ushort();
|
||||
$this->tables = array();
|
||||
for ($i=0;$i<$this->numTables;$i++) { // 1.02
|
||||
$record = array();
|
||||
$record['tag'] = $this->read_tag();
|
||||
$record['checksum'] = array($this->read_ushort(),$this->read_ushort());
|
||||
$record['offset'] = $this->read_ulong();
|
||||
$record['length'] = $this->read_ulong();
|
||||
$this->tables[$record['tag']] = $record;
|
||||
}
|
||||
if (!$presubset) $this->checksumTables();
|
||||
}
|
||||
|
||||
function checksumTables() {
|
||||
// Check the checksums for all tables
|
||||
foreach($this->tables AS $t) {
|
||||
if ($t['length'] > 0 && $t['length'] < $this->maxStrLenRead) { // 1.02
|
||||
$table = $this->get_chunk($t['offset'], $t['length']);
|
||||
$checksum = $this->calcChecksum($table);
|
||||
if ($t['tag'] == 'head') {
|
||||
$up = unpack('n*', substr($table,8,4));
|
||||
$adjustment[0] = $up[1];
|
||||
$adjustment[1] = $up[2];
|
||||
$checksum = $this->sub32($checksum, $adjustment);
|
||||
}
|
||||
$xchecksum = $t['checksum'];
|
||||
if ($xchecksum != $checksum)
|
||||
die(sprintf('TTF file "%s": invalid checksum %s table: %s (expected %s)', $this->filename,dechex($checksum[0]).dechex($checksum[1]),$t['tag'],dechex($xchecksum[0]).dechex($xchecksum[1])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function sub32($x, $y) {
|
||||
$xlo = $x[1];
|
||||
$xhi = $x[0];
|
||||
$ylo = $y[1];
|
||||
$yhi = $y[0];
|
||||
if ($ylo > $xlo) { $xlo += 1 << 16; $yhi += 1; }
|
||||
$reslo = $xlo-$ylo;
|
||||
if ($yhi > $xhi) { $xhi += 1 << 16; }
|
||||
$reshi = $xhi-$yhi;
|
||||
$reshi = $reshi & 0xFFFF;
|
||||
return array($reshi, $reslo);
|
||||
}
|
||||
|
||||
function calcChecksum($data) {
|
||||
if (strlen($data) % 4) { $data .= str_repeat("\0",(4-(strlen($data) % 4))); }
|
||||
$hi=0x0000;
|
||||
$lo=0x0000;
|
||||
for($i=0;$i<strlen($data);$i+=4) {
|
||||
$hi += (ord($data[$i])<<8) + ord($data[$i+1]);
|
||||
$lo += (ord($data[$i+2])<<8) + ord($data[$i+3]);
|
||||
$hi += $lo >> 16;
|
||||
$lo = $lo & 0xFFFF;
|
||||
$hi = $hi & 0xFFFF;
|
||||
}
|
||||
return array($hi, $lo);
|
||||
}
|
||||
|
||||
function get_table_pos($tag) {
|
||||
$offset = $this->tables[$tag]['offset'];
|
||||
$length = $this->tables[$tag]['length'];
|
||||
return array($offset, $length);
|
||||
}
|
||||
|
||||
function seek($pos) {
|
||||
$this->_pos = $pos;
|
||||
fseek($this->fh,$this->_pos);
|
||||
}
|
||||
|
||||
function skip($delta) {
|
||||
$this->_pos = $this->_pos + $delta;
|
||||
fseek($this->fh,$this->_pos);
|
||||
}
|
||||
|
||||
function seek_table($tag, $offset_in_table = 0) {
|
||||
$tpos = $this->get_table_pos($tag);
|
||||
$this->_pos = $tpos[0] + $offset_in_table;
|
||||
fseek($this->fh, $this->_pos);
|
||||
return $this->_pos;
|
||||
}
|
||||
|
||||
function read_tag() {
|
||||
$this->_pos += 4;
|
||||
return fread($this->fh,4);
|
||||
}
|
||||
|
||||
function read_short() {
|
||||
$this->_pos += 2;
|
||||
$s = fread($this->fh,2);
|
||||
$a = (ord($s[0])<<8) + ord($s[1]);
|
||||
if ($a & (1 << 15) ) { $a = ($a - (1 << 16)) ; }
|
||||
return $a;
|
||||
}
|
||||
|
||||
function read_ushort() {
|
||||
$this->_pos += 2;
|
||||
$s = fread($this->fh,2);
|
||||
return (ord($s[0])<<8) + ord($s[1]);
|
||||
}
|
||||
|
||||
function read_ulong() {
|
||||
$this->_pos += 4;
|
||||
$s = fread($this->fh,4);
|
||||
// if large uInt32 as an integer, PHP converts it to -ve
|
||||
return (ord($s[0])*16777216) + (ord($s[1])<<16) + (ord($s[2])<<8) + ord($s[3]); // 16777216 = 1<<24
|
||||
}
|
||||
|
||||
function get_ushort($pos) {
|
||||
fseek($this->fh,$pos);
|
||||
$s = fread($this->fh,2);
|
||||
return (ord($s[0])<<8) + ord($s[1]);
|
||||
}
|
||||
|
||||
function get_ulong($pos) {
|
||||
fseek($this->fh,$pos);
|
||||
$s = fread($this->fh,4);
|
||||
// iF large uInt32 as an integer, PHP converts it to -ve
|
||||
return (ord($s[0])*16777216) + (ord($s[1])<<16) + (ord($s[2])<<8) + ord($s[3]); // 16777216 = 1<<24
|
||||
}
|
||||
|
||||
function pack_short($val) {
|
||||
if ($val<0) {
|
||||
$val = abs($val);
|
||||
$val = ~$val;
|
||||
$val += 1;
|
||||
}
|
||||
return pack("n",$val);
|
||||
}
|
||||
|
||||
function splice($stream, $offset, $value) {
|
||||
return substr($stream,0,$offset) . $value . substr($stream,$offset+strlen($value));
|
||||
}
|
||||
|
||||
function _set_ushort($stream, $offset, $value) {
|
||||
$up = pack("n", $value);
|
||||
return $this->splice($stream, $offset, $up);
|
||||
}
|
||||
|
||||
function get_chunk($pos, $length) {
|
||||
fseek($this->fh,$pos);
|
||||
if ($length <1) { return ''; } // 1.02
|
||||
return (fread($this->fh,$length));
|
||||
}
|
||||
|
||||
function get_table($tag) {
|
||||
list($pos, $length) = $this->get_table_pos($tag);
|
||||
if ($length == 0) { die('Truetype font ('.$this->filename.'): error reading table: '.$tag); } // 1.02
|
||||
fseek($this->fh,$pos);
|
||||
return (fread($this->fh,$length));
|
||||
}
|
||||
|
||||
function add($tag, $data) {
|
||||
if ($tag == 'head') {
|
||||
$data = $this->splice($data, 8, "\0\0\0\0");
|
||||
}
|
||||
$this->otables[$tag] = $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
function extractInfo($presubset=0) {
|
||||
// = 0 ; validate; does not need glyphPos or charToGlyph
|
||||
// presubset = 1; no validation; does not need name and other metrics
|
||||
///////////////////////////////////
|
||||
// name - Naming table
|
||||
///////////////////////////////////
|
||||
if (!$presubset) {
|
||||
$name_offset = $this->seek_table("name");
|
||||
$format = $this->read_ushort();
|
||||
if ($format != 0)
|
||||
die("Unknown name table format ".$format);
|
||||
$numRecords = $this->read_ushort();
|
||||
$string_data_offset = $name_offset + $this->read_ushort();
|
||||
|
||||
$names = array(1=>'',2=>'',3=>'',4=>'',6=>'');
|
||||
$K = array_keys($names);
|
||||
$nameCount = count($names);
|
||||
for ($i=0;$i<$numRecords; $i++) {
|
||||
$platformId = $this->read_ushort();
|
||||
$encodingId = $this->read_ushort();
|
||||
$languageId = $this->read_ushort();
|
||||
$nameId = $this->read_ushort();
|
||||
$length = $this->read_ushort();
|
||||
$offset = $this->read_ushort();
|
||||
if (!in_array($nameId,$K)) continue;
|
||||
$N = '';
|
||||
if ($platformId == 3 && $encodingId == 1 && $languageId == 0x409) { // Microsoft, Unicode, US English, PS Name
|
||||
$opos = $this->_pos;
|
||||
$this->seek($string_data_offset + $offset);
|
||||
if ($length % 2 != 0)
|
||||
die("PostScript name is UTF-16BE string of odd length");
|
||||
$length /= 2;
|
||||
$N = '';
|
||||
while ($length > 0) {
|
||||
$char = $this->read_ushort();
|
||||
$N .= (chr($char)); // 1.02
|
||||
$length -= 1;
|
||||
}
|
||||
$this->_pos = $opos;
|
||||
$this->seek($opos);
|
||||
}
|
||||
else if ($platformId == 1 && $encodingId == 0 && $languageId == 0) { // Macintosh, Roman, English, PS Name
|
||||
$opos = $this->_pos;
|
||||
$N = $this->get_chunk($string_data_offset + $offset, $length);
|
||||
$this->_pos = $opos;
|
||||
$this->seek($opos);
|
||||
}
|
||||
if ($N && $names[$nameId]=='') {
|
||||
$names[$nameId] = $N;
|
||||
$nameCount -= 1;
|
||||
if ($nameCount==0) break;
|
||||
}
|
||||
}
|
||||
if ($names[6])
|
||||
$psName = preg_replace('/ /','-',$names[6]);
|
||||
else if ($names[4])
|
||||
$psName = preg_replace('/ /','-',$names[4]);
|
||||
else if ($names[1])
|
||||
$psName = preg_replace('/ /','-',$names[1]);
|
||||
else
|
||||
$psName = '';
|
||||
if (!$psName)
|
||||
die("Could not find PostScript font name");
|
||||
for ($i=0;$i<strlen($psName);$i++) {
|
||||
$c = $psName{$i}; // 1.02
|
||||
$oc = ord($c);
|
||||
if ($oc>126 || strpos(' [](){}<>/%',$c)!==false)
|
||||
die("psName=".$psName." contains invalid character ".$c." ie U+".ord(c));
|
||||
}
|
||||
$this->name = $psName;
|
||||
if ($names[1]) { $this->familyName = $names[1]; } else { $this->familyName = $psName; }
|
||||
if ($names[2]) { $this->styleName = $names[2]; } else { $this->styleName = 'Regular'; }
|
||||
if ($names[4]) { $this->fullName = $names[4]; } else { $this->fullName = $psName; }
|
||||
if ($names[3]) { $this->uniqueFontID = $names[3]; } else { $this->uniqueFontID = $psName; }
|
||||
}
|
||||
|
||||
///////////////////////////////////
|
||||
// head - Font header table
|
||||
///////////////////////////////////
|
||||
$this->seek_table("head");
|
||||
if ($presubset) { $this->skip(18); }
|
||||
else {
|
||||
$ver_maj = $this->read_ushort();
|
||||
$ver_min = $this->read_ushort();
|
||||
if ($ver_maj != 1)
|
||||
die('Unknown head table version '. $ver_maj .'.'. $ver_min);
|
||||
$this->fontRevision = $this->read_ushort() . $this->read_ushort();
|
||||
|
||||
$this->skip(4);
|
||||
$magic = $this->read_ulong();
|
||||
if ($magic != 0x5F0F3CF5)
|
||||
die('Invalid head table magic ' .$magic);
|
||||
$this->skip(2);
|
||||
}
|
||||
$this->unitsPerEm = $unitsPerEm = $this->read_ushort(); // 1.02
|
||||
$scale = 1000 / $unitsPerEm; // 1.02
|
||||
if ($presubset) { $this->skip(30); } // 1.02
|
||||
else {
|
||||
$this->skip(16);
|
||||
$xMin = $this->read_short();
|
||||
$yMin = $this->read_short();
|
||||
$xMax = $this->read_short();
|
||||
$yMax = $this->read_short();
|
||||
$this->bbox = array(($xMin*$scale), ($yMin*$scale), ($xMax*$scale), ($yMax*$scale));
|
||||
$this->skip(3*2);
|
||||
}
|
||||
$indexToLocFormat = $this->read_ushort();
|
||||
$glyphDataFormat = $this->read_ushort();
|
||||
if ($glyphDataFormat != 0)
|
||||
die('Unknown glyph data format '.$glyphDataFormat);
|
||||
|
||||
///////////////////////////////////
|
||||
// hhea metrics table
|
||||
///////////////////////////////////
|
||||
// ttf2t1 seems to use this value rather than the one in OS/2 - so put in for compatibility
|
||||
if (isset($this->tables["hhea"])) {
|
||||
$this->seek_table("hhea");
|
||||
$this->skip(4);
|
||||
$hheaAscender = $this->read_short();
|
||||
$hheaDescender = $this->read_short();
|
||||
$this->ascent = ($hheaAscender *$scale);
|
||||
$this->descent = ($hheaDescender *$scale);
|
||||
}
|
||||
|
||||
///////////////////////////////////
|
||||
// OS/2 - OS/2 and Windows metrics table
|
||||
///////////////////////////////////
|
||||
if (isset($this->tables["OS/2"])) {
|
||||
$this->seek_table("OS/2");
|
||||
$version = $this->read_ushort();
|
||||
$this->skip(2);
|
||||
$usWeightClass = $this->read_ushort();
|
||||
$this->skip(2);
|
||||
$fsType = $this->read_ushort();
|
||||
// if ($fsType == 0x0002 || ($fsType & 0x0300) != 0)
|
||||
// die('Font does not allow subsetting/embedding');
|
||||
$this->skip(58); //11*2 + 10 + 4*4 + 4 + 3*2
|
||||
$sTypoAscender = $this->read_short();
|
||||
$sTypoDescender = $this->read_short();
|
||||
if (!$this->ascent) $this->ascent = ($sTypoAscender*$scale);
|
||||
if (!$this->descent) $this->descent = ($sTypoDescender*$scale);
|
||||
if ($version > 1) {
|
||||
$this->skip(16);
|
||||
$sCapHeight = $this->read_short();
|
||||
$this->capHeight = ($sCapHeight*$scale);
|
||||
}
|
||||
else {
|
||||
$this->capHeight = $this->ascent;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$usWeightClass = 500;
|
||||
if (!$this->ascent) $this->ascent = ($yMax*$scale);
|
||||
if (!$this->descent) $this->descent = ($yMin*$scale);
|
||||
$this->capHeight = $this->ascent;
|
||||
}
|
||||
$this->stemV = 50 + intval(pow(($usWeightClass / 65.0),2));
|
||||
|
||||
///////////////////////////////////
|
||||
// post - PostScript table
|
||||
///////////////////////////////////
|
||||
$this->seek_table("post");
|
||||
if ($presubset) { $this->skip(4); }
|
||||
else {
|
||||
$ver_maj = $this->read_ushort();
|
||||
$ver_min = $this->read_ushort();
|
||||
if ($ver_maj <1 || $ver_maj >4)
|
||||
die('Unknown post table version '.$ver_maj);
|
||||
}
|
||||
$this->italicAngle = $this->read_short() + $this->read_ushort() / 65536.0;
|
||||
$this->underlinePosition = $this->read_short() * $scale;
|
||||
$this->underlineThickness = $this->read_short() * $scale;
|
||||
$isFixedPitch = $this->read_ulong();
|
||||
|
||||
$this->flags = 4;
|
||||
|
||||
if ($this->italicAngle!= 0)
|
||||
$this->flags = $this->flags | 64;
|
||||
if ($usWeightClass >= 600)
|
||||
$this->flags = $this->flags | 262144;
|
||||
if ($isFixedPitch)
|
||||
$this->flags = $this->flags | 1;
|
||||
|
||||
///////////////////////////////////
|
||||
// hhea - Horizontal header table
|
||||
///////////////////////////////////
|
||||
$this->seek_table("hhea");
|
||||
if ($presubset) { $this->skip(32); }
|
||||
else {
|
||||
$ver_maj = $this->read_ushort();
|
||||
$ver_min = $this->read_ushort();
|
||||
if ($ver_maj != 1)
|
||||
die('Unknown hhea table version '.$ver_maj);
|
||||
$this->skip(28);
|
||||
}
|
||||
$metricDataFormat = $this->read_ushort();
|
||||
if ($metricDataFormat != 0)
|
||||
die('Unknown horizontal metric data format '.$metricDataFormat);
|
||||
$numberOfHMetrics = $this->read_ushort();
|
||||
if ($numberOfHMetrics == 0)
|
||||
die('Number of horizontal metrics is 0');
|
||||
|
||||
///////////////////////////////////
|
||||
// maxp - Maximum profile table
|
||||
///////////////////////////////////
|
||||
$this->seek_table("maxp");
|
||||
if ($presubset) { $this->skip(4); }
|
||||
else {
|
||||
$ver_maj = $this->read_ushort();
|
||||
$ver_min = $this->read_ushort();
|
||||
if ($ver_maj != 1)
|
||||
die('Unknown maxp table version '.$ver_maj);
|
||||
}
|
||||
$numGlyphs = $this->read_ushort();
|
||||
|
||||
///////////////////////////////////
|
||||
// cmap - Character to glyph index mapping table
|
||||
///////////////////////////////////
|
||||
$cmap_offset = $this->seek_table("cmap");
|
||||
$this->skip(2);
|
||||
$cmapTableCount = $this->read_ushort();
|
||||
$unicode_cmap_offset = 0;
|
||||
for ($i=0;$i<$cmapTableCount;$i++) {
|
||||
$platformID = $this->read_ushort();
|
||||
$encodingID = $this->read_ushort();
|
||||
$offset = $this->read_ulong();
|
||||
$save_pos = $this->_pos;
|
||||
if ($platformID == 3 && $encodingID == 1) { // Microsoft, Unicode
|
||||
$format = $this->get_ushort($cmap_offset + $offset);
|
||||
if ($format == 4) {
|
||||
$unicode_cmap_offset = $cmap_offset + $offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ($platformID == 0) { // Unicode -- assume all encodings are compatible
|
||||
$format = $this->get_ushort($cmap_offset + $offset);
|
||||
if ($format == 4) {
|
||||
$unicode_cmap_offset = $cmap_offset + $offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->seek($save_pos );
|
||||
}
|
||||
|
||||
if (!$unicode_cmap_offset)
|
||||
die('Font does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)');
|
||||
$this->seek($unicode_cmap_offset + 2);
|
||||
$length = $this->read_ushort();
|
||||
$limit = $unicode_cmap_offset + $length;
|
||||
$this->skip(2);
|
||||
|
||||
$segCount = $this->read_ushort() / 2;
|
||||
$this->skip(6);
|
||||
$endCount = array();
|
||||
for($i=0; $i<$segCount; $i++) { $endCount[] = $this->read_ushort(); }
|
||||
$this->skip(2);
|
||||
$startCount = array();
|
||||
for($i=0; $i<$segCount; $i++) { $startCount[] = $this->read_ushort(); }
|
||||
$idDelta = array();
|
||||
for($i=0; $i<$segCount; $i++) { $idDelta[] = $this->read_short(); } // ???? was unsigned short
|
||||
$idRangeOffset_start = $this->_pos;
|
||||
$idRangeOffset = array();
|
||||
for($i=0; $i<$segCount; $i++) { $idRangeOffset[] = $this->read_ushort(); }
|
||||
|
||||
$glyphToChar = array();
|
||||
$charToGlyph = array();
|
||||
for ($n=0;$n<$segCount;$n++) {
|
||||
for ($unichar=$startCount[$n];$unichar<($endCount[$n] + 1);$unichar++) {
|
||||
if ($idRangeOffset[$n] == 0)
|
||||
$glyph = ($unichar + $idDelta[$n]) & 0xFFFF;
|
||||
else {
|
||||
$offset = ($unichar - $startCount[$n]) * 2 + $idRangeOffset[$n];
|
||||
$offset = $idRangeOffset_start + 2 * $n + $offset;
|
||||
if ($offset >= $limit)
|
||||
$glyph = 0;
|
||||
else {
|
||||
$glyph = $this->get_ushort($offset);
|
||||
if ($glyph != 0)
|
||||
$glyph = ($glyph + $idDelta[$n]) & 0xFFFF;
|
||||
}
|
||||
}
|
||||
if ($presubset) $charToGlyph[$unichar] = $glyph;
|
||||
$glyphToChar[$glyph][] = $unichar;
|
||||
}
|
||||
}
|
||||
if ($presubset) $this->charToGlyph = $charToGlyph;
|
||||
|
||||
///////////////////////////////////
|
||||
// hmtx - Horizontal metrics table
|
||||
///////////////////////////////////
|
||||
$this->seek_table("hmtx");
|
||||
$aw = 0;
|
||||
$this->charWidths = array();
|
||||
$this->hmetrics = array();
|
||||
for( $glyph=0; $glyph<$numberOfHMetrics; $glyph++) {
|
||||
$aw = $this->read_ushort();
|
||||
$lsb = $this->read_short();
|
||||
$this->hmetrics[] = array($aw, $lsb);
|
||||
$aw = $scale*$aw;
|
||||
if ($glyph == 0)
|
||||
$this->defaultWidth = $aw;
|
||||
if (isset($glyphToChar[$glyph])) {
|
||||
foreach($glyphToChar[$glyph] AS $char) {
|
||||
$this->charWidths[$char] = round($aw);
|
||||
}
|
||||
}
|
||||
}
|
||||
for( $glyph=$numberOfHMetrics; $glyph<$numGlyphs; $glyph++) {
|
||||
$lsb = $this->read_ushort();
|
||||
$this->hmetrics[] = array($aw, $lsb);
|
||||
if (isset($glyphToChar[$glyph])) {
|
||||
foreach($glyphToChar[$glyph] AS $char) {
|
||||
$this->charWidths[$char] = round($aw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////
|
||||
// loca - Index to location
|
||||
///////////////////////////////////
|
||||
if ($presubset) {
|
||||
$this->seek_table('loca');
|
||||
$this->glyphPos = array();
|
||||
if ($indexToLocFormat == 0) {
|
||||
for ($n=0; $n<=$numGlyphs; $n++) { // 1.02
|
||||
$this->glyphPos[] = ($this->read_ushort() * 2);
|
||||
}
|
||||
}
|
||||
else if ($indexToLocFormat == 1) {
|
||||
for ($n=0; $n<=$numGlyphs; $n++) { // 1.02
|
||||
$this->glyphPos[] = ($this->read_ulong());
|
||||
}
|
||||
}
|
||||
else
|
||||
die('Unknown location table format '.$indexToLocFormat);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
function makeSubset($subset) {
|
||||
$this->fh = fopen($this->filename ,'rb') or die('Can\'t open file ' . $this->filename );
|
||||
$this->otables = array();
|
||||
$glyphMap = array(0=>0);
|
||||
$glyphSet = array(0=>0);
|
||||
$codeToGlyph = array();
|
||||
foreach($subset AS $code) {
|
||||
if (isset($this->charToGlyph[$code]))
|
||||
$originalGlyphIdx = $this->charToGlyph[$code];
|
||||
else
|
||||
$originalGlyphIdx = 0;
|
||||
if (!isset($glyphSet[$originalGlyphIdx])) {
|
||||
$glyphSet[$originalGlyphIdx] = count($glyphMap);
|
||||
$glyphMap[] = $originalGlyphIdx;
|
||||
}
|
||||
$codeToGlyph[$code] = $glyphSet[$originalGlyphIdx];
|
||||
}
|
||||
|
||||
list($start,$dummy) = $this->get_table_pos('glyf');
|
||||
|
||||
$n = 0;
|
||||
while ($n < count($glyphMap)) {
|
||||
$originalGlyphIdx = $glyphMap[$n];
|
||||
$glyphPos = $this->glyphPos[$originalGlyphIdx];
|
||||
$glyphLen = $this->glyphPos[$originalGlyphIdx + 1] - $glyphPos;
|
||||
$n += 1;
|
||||
if (!$glyphLen) continue;
|
||||
$this->seek($start + $glyphPos);
|
||||
$numberOfContours = $this->read_short();
|
||||
if ($numberOfContours < 0) {
|
||||
$this->skip(8);
|
||||
$flags = GF_MORE;
|
||||
while ($flags & GF_MORE) {
|
||||
$flags = $this->read_ushort();
|
||||
$glyphIdx = $this->read_ushort();
|
||||
if (!isset($glyphSet[$glyphIdx])) {
|
||||
$glyphSet[$glyphIdx] = count($glyphMap);
|
||||
$glyphMap[] = $glyphIdx;
|
||||
}
|
||||
if ($flags & GF_WORDS)
|
||||
$this->skip(4);
|
||||
else
|
||||
$this->skip(2);
|
||||
if ($flags & GF_SCALE)
|
||||
$this->skip(2);
|
||||
else if ($flags & GF_XYSCALE)
|
||||
$this->skip(4);
|
||||
else if ($flags & GF_TWOBYTWO)
|
||||
$this->skip(8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$numGlyphs = $n = count($glyphMap);
|
||||
while ($n > 1 && $this->hmetrics[$n][0] == $this->hmetrics[$n - 1][0]) { $n -= 1; }
|
||||
$numberOfHMetrics = $n;
|
||||
|
||||
//tables copied from the original
|
||||
$tags = array ('name', 'OS/2', 'prep');
|
||||
foreach($tags AS $tag) { $this->add($tag, $this->get_table($tag)); }
|
||||
$tags = array ('cvt ', 'fpgm');
|
||||
foreach($tags AS $tag) { // 1.02
|
||||
if (isset($this->table['tag'])) { $this->add($tag, $this->get_table($tag)); }
|
||||
}
|
||||
|
||||
// post - PostScript
|
||||
$opost = $this->get_table('post');
|
||||
$post = "\x00\x03\x00\x00" . substr($opost,4,12) . "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
|
||||
$this->add('post', $post);
|
||||
|
||||
// hhea - Horizontal Header
|
||||
$hhea = $this->get_table('hhea');
|
||||
$hhea = $this->_set_ushort($hhea, 34, $numberOfHMetrics);
|
||||
$this->add('hhea', $hhea);
|
||||
|
||||
// maxp - Maximum Profile
|
||||
$maxp = $this->get_table('maxp');
|
||||
$maxp = $this->_set_ushort($maxp, 4, $numGlyphs);
|
||||
$this->add('maxp', $maxp);
|
||||
|
||||
// cmap - Character to glyph mapping - Format 6
|
||||
$entryCount = count($subset);
|
||||
$length = 10 + $entryCount * 2;
|
||||
$cmap = array(0, 1, // Index : version, number of subtables
|
||||
1, 0, // Subtable : platform, encoding
|
||||
0, 12, // offset (hi,lo)
|
||||
6, $length, // Format 6 Mapping table: format, length
|
||||
0, 1, // language, First char code
|
||||
$entryCount);
|
||||
|
||||
foreach($subset AS $code) { $cmap[] = $codeToGlyph[$code]; }
|
||||
$cmapstr = '';
|
||||
foreach($cmap AS $cm) { $cmapstr .= pack("n",$cm); }
|
||||
$this->add('cmap', $cmapstr);
|
||||
|
||||
/*
|
||||
// cmap - Character to glyph mapping - Format 4 (MS / )
|
||||
$segCount = 2;
|
||||
$searchRange = 1;
|
||||
$entrySelector = 0;
|
||||
while ($searchRange * 2 <= $segCount ) {
|
||||
$searchRange = $searchRange * 2;
|
||||
$entrySelector = $entrySelector + 1;
|
||||
}
|
||||
$searchRange = $searchRange * 16;
|
||||
$rangeShift = $segCount * 16 - $searchRange;
|
||||
$length = 48 + ($numGlyphs-1);
|
||||
$cmap = array(0, 1, // Index : version, number of subtables
|
||||
3, 0, // Subtable : platform (MS=3), encoding
|
||||
0, 12, // Subtable : offset (hi,lo)
|
||||
4, $length, 0, // Format 4 Mapping table: format, length, language
|
||||
$segCount*2,
|
||||
$searchRange,
|
||||
$entrySelector,
|
||||
$rangeShift,
|
||||
$numGlyphs, 0xFFFF, // endCode(s)
|
||||
0,
|
||||
1, 0xFFFF, // startCode(s)
|
||||
0, 1, // idDelta(s) Delta for all character codes in segment
|
||||
0, 0); // idRangeOffset[segCount] Offset in bytes to glyph indexArray, or 0
|
||||
foreach($subset AS $code) { $cmap[] = $codeToGlyph[$code]; }
|
||||
$cmap[] = 0xFFFF;
|
||||
$cmapstr = '';
|
||||
foreach($cmap AS $cm) { $cmapstr .= pack("n",$cm); }
|
||||
$this->add('cmap', $cmapstr);
|
||||
*/
|
||||
|
||||
|
||||
// hmtx - Horizontal Metrics
|
||||
$hmtxstr = '';
|
||||
for($n=0;$n<$numGlyphs;$n++) {
|
||||
$originalGlyphIdx = $glyphMap[$n];
|
||||
$aw = $this->hmetrics[$originalGlyphIdx][0];
|
||||
$lsb = $this->hmetrics[$originalGlyphIdx][1];
|
||||
if ($n < $numberOfHMetrics) { $hmtxstr .= pack("n",$aw); }
|
||||
$hmtxstr .= $this->pack_short($lsb);
|
||||
}
|
||||
$this->add('hmtx', $hmtxstr);
|
||||
|
||||
// glyf - Glyph data
|
||||
list($glyfOffset,$glyfLength) = $this->get_table_pos('glyf');
|
||||
if ($glyfLength < $this->maxStrLenRead) {
|
||||
$glyphData = $this->get_table('glyf');
|
||||
}
|
||||
|
||||
$offsets = array();
|
||||
$glyf = '';
|
||||
$pos = 0;
|
||||
|
||||
for ($n=0;$n<$numGlyphs;$n++) {
|
||||
$offsets[] = $pos;
|
||||
$originalGlyphIdx = $glyphMap[$n];
|
||||
$glyphPos = $this->glyphPos[$originalGlyphIdx];
|
||||
$glyphLen = $this->glyphPos[$originalGlyphIdx + 1] - $glyphPos;
|
||||
if ($glyfLength < $this->maxStrLenRead) {
|
||||
$data = substr($glyphData,$glyphPos,$glyphLen);
|
||||
}
|
||||
else {
|
||||
if ($glyphLen > 0) $data = $this->get_chunk($glyfOffset+$glyphPos,$glyphLen);
|
||||
else $data = '';
|
||||
}
|
||||
if ($glyphLen > 0) $up = unpack("n", substr($data,0,2));
|
||||
if ($glyphLen > 2 && ($up[1] & (1 << 15)) ) {
|
||||
$pos_in_glyph = 10;
|
||||
$flags = GF_MORE;
|
||||
while ($flags & GF_MORE) {
|
||||
$up = unpack("n", substr($data,$pos_in_glyph,2));
|
||||
$flags = $up[1];
|
||||
$up = unpack("n", substr($data,$pos_in_glyph+2,2));
|
||||
$glyphIdx = $up[1];
|
||||
$data = $this->_set_ushort($data, $pos_in_glyph + 2, $glyphSet[$glyphIdx]);
|
||||
$pos_in_glyph += 4;
|
||||
if ($flags & GF_WORDS) { $pos_in_glyph += 4; }
|
||||
else { $pos_in_glyph += 2; }
|
||||
if ($flags & GF_SCALE) { $pos_in_glyph += 2; }
|
||||
else if ($flags & GF_XYSCALE) { $pos_in_glyph += 4; }
|
||||
else if ($flags & GF_TWOBYTWO) { $pos_in_glyph += 8; }
|
||||
}
|
||||
}
|
||||
$glyf .= $data;
|
||||
$pos += $glyphLen;
|
||||
if ($pos % 4 != 0) {
|
||||
$padding = 4 - ($pos % 4);
|
||||
$glyf .= str_repeat("\0",$padding);
|
||||
$pos += $padding;
|
||||
}
|
||||
}
|
||||
$offsets[] = $pos;
|
||||
$this->add('glyf', $glyf);
|
||||
|
||||
// loca - Index to location
|
||||
$locastr = '';
|
||||
if ((($pos + 1) >> 1) > 0xFFFF) {
|
||||
$indexToLocFormat = 1; // long format
|
||||
foreach($offsets AS $offset) { $locastr .= pack("N",$offset); }
|
||||
}
|
||||
else {
|
||||
$indexToLocFormat = 0; // short format
|
||||
foreach($offsets AS $offset) { $locastr .= pack("n",($offset/2)); }
|
||||
}
|
||||
$this->add('loca', $locastr);
|
||||
|
||||
// head - Font header
|
||||
$head = $this->get_table('head');
|
||||
$head = $this->_set_ushort($head, 50, $indexToLocFormat);
|
||||
$this->add('head', $head);
|
||||
|
||||
fclose($this->fh);
|
||||
|
||||
// Put the TTF file together
|
||||
$stm = '';
|
||||
$numTables = count($this->otables);
|
||||
$searchRange = 1;
|
||||
$entrySelector = 0;
|
||||
while ($searchRange * 2 <= $numTables) {
|
||||
$searchRange = $searchRange * 2;
|
||||
$entrySelector = $entrySelector + 1;
|
||||
}
|
||||
$searchRange = $searchRange * 16;
|
||||
$rangeShift = $numTables * 16 - $searchRange;
|
||||
|
||||
// Header
|
||||
$stm .= (pack("Nnnnn", 0x74727565, $numTables, $searchRange, $entrySelector, $rangeShift)); // 0x74727565 "true" for Mac
|
||||
// 0x00010000 for Windows
|
||||
|
||||
// Table directory
|
||||
$tables = $this->otables;
|
||||
ksort ($tables);
|
||||
$offset = 12 + $numTables * 16;
|
||||
foreach ($tables AS $tag=>$data) {
|
||||
if ($tag == 'head') { $head_start = $offset; }
|
||||
$stm .= $tag;
|
||||
$checksum = $this->calcChecksum($data);
|
||||
$stm .= pack("nn", $checksum[0],$checksum[1]);
|
||||
$stm .= pack("NN", $offset, strlen($data));
|
||||
$paddedLength = (strlen($data)+3)&~3;
|
||||
$offset = $offset + $paddedLength;
|
||||
}
|
||||
|
||||
// Table data
|
||||
foreach ($tables AS $tag=>$data) {
|
||||
$data .= "\0\0\0";
|
||||
$stm .= substr($data,0,(strlen($data)&~3));
|
||||
}
|
||||
|
||||
$checksum = $this->calcChecksum($stm);
|
||||
$checksum = $this->sub32(array(0xB1B0,0xAFBA), $checksum);
|
||||
$chk = pack("nn", $checksum[0],$checksum[1]);
|
||||
$stm = $this->splice($stm,($head_start + 8),$chk);
|
||||
return $stm ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
15
include/tfpdf/font/zapfdingbats.php
Normal file
15
include/tfpdf/font/zapfdingbats.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
$fpdf_charwidths['zapfdingbats']=array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
|
||||
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
|
||||
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
|
||||
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
|
||||
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
|
||||
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
|
||||
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
|
||||
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
|
||||
?>
|
||||
2098
include/tfpdf/tfpdf.php
Normal file
2098
include/tfpdf/tfpdf.php
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue