From 7f1f40d691644393b663318c282c8ae99312470a Mon Sep 17 00:00:00 2001
From: Nick
Date: Fri, 7 Oct 2011 19:39:29 +0200
Subject: [PATCH] 5.9.129
---
CHANGELOG.TXT | 5 +
README.TXT | 6 +-
fonts/helvetica.php | 3 +-
fonts/helveticab.php | 2 +-
fonts/helveticabi.php | 2 +-
fonts/helveticai.php | 2 +-
fonts/times.php | 2 +-
fonts/timesb.php | 2 +-
fonts/timesbi.php | 2 +-
fonts/timesi.php | 2 +-
tcpdf.php | 230 ++++++++++++++++++++++++++++--------------
11 files changed, 170 insertions(+), 88 deletions(-)
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index 085e690..f023a66 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,3 +1,8 @@
+5.9.129 (2011-10-07)
+ - Core fonts metrics was fixed (replace all helvetica and times php files on fonts folder).
+ - Form fields support was improved and some problems were fixed (check the example n. 14).
+ - Bug item #3420249 "Issue with booklet and MultiCell" was fixed.
+
5.9.128 (2011-10-06)
- Method addTTFfont() was improved (check the source code documentation).
- Method setExtraXMP() to set custom XMP data was added.
diff --git a/README.TXT b/README.TXT
index cad51e0..e735aca 100755
--- a/README.TXT
+++ b/README.TXT
@@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
-Version: 5.9.128
-Release date: 2011-10-06
+Version: 5.9.129
+Release date: 2011-10-07
Author: Nicola Asuni
Copyright (c) 2002-2011:
@@ -31,7 +31,7 @@ Main Features:
* no external libraries are required for the basic functions;
* all standard page formats, custom page formats, custom margins and units of measure;
* UTF-8 Unicode and Right-To-Left languages;
- * TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
+ * TrueTypeUnicode, OpenTypeUnicode v1, TrueType, OpenType v1, Type1 and CID-0 fonts;
* font subsetting;
* methods to publish some XHTML + CSS code, Javascript and Forms;
* images, graphic (geometric figures) and transformation methods;
diff --git a/fonts/helvetica.php b/fonts/helvetica.php
index 0e90b32..d1aa6d8 100644
--- a/fonts/helvetica.php
+++ b/fonts/helvetica.php
@@ -8,5 +8,6 @@ $dw=513;
$diff='';
$enc='';
$desc=array('Flags'=>32,'FontBBox'=>'[-166 -225 1000 931]','ItalicAngle'=>0,'Ascent'=>931,'Descent'=>-225,'Leading'=>0,'CapHeight'=>718,'XHeight'=>523,'StemV'=>88,'StemH'=>76,'AvgWidth'=>513,'MaxWidth'=>1015,'MissingWidth'=>513);
-$cw=array(0=>513,1=>513,2=>513,3=>513,4=>513,5=>513,6=>513,7=>513,8=>513,9=>513,10=>513,11=>513,12=>513,13=>513,14=>513,15=>513,16=>513,17=>513,18=>513,19=>513,20=>513,21=>513,22=>513,23=>513,24=>513,25=>513,26=>513,27=>513,28=>513,29=>513,30=>513,31=>513,32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>222,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>278,94=>469,95=>556,96=>222,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,127=>513,128=>513,129=>513,130=>513,131=>513,132=>513,133=>513,134=>513,135=>513,136=>513,137=>513,138=>513,139=>513,140=>513,141=>513,142=>513,143=>513,144=>513,145=>513,146=>513,147=>513,148=>513,149=>513,150=>513,151=>513,152=>513,153=>513,154=>513,155=>513,156=>513,157=>513,158=>513,159=>513,160=>513,161=>333,162=>556,163=>556,164=>167,165=>556,166=>556,167=>556,168=>556,169=>191,170=>333,171=>556,172=>333,173=>333,174=>500,175=>500,176=>513,177=>556,178=>556,179=>556,180=>278,181=>513,182=>537,183=>350,184=>222,185=>333,186=>333,187=>556,188=>1000,189=>1000,190=>513,191=>611,192=>513,193=>333,194=>333,195=>333,196=>333,197=>333,198=>333,199=>333,200=>333,201=>513,202=>333,203=>333,204=>513,205=>333,206=>333,207=>333,208=>1000,209=>513,210=>513,211=>513,212=>513,213=>513,214=>513,215=>513,216=>513,217=>513,218=>513,219=>513,220=>513,221=>513,222=>513,223=>513,224=>513,225=>1000,226=>513,227=>370,228=>513,229=>513,230=>513,231=>513,232=>556,233=>778,234=>1000,235=>365,236=>513,237=>513,238=>513,239=>513,240=>513,241=>889,242=>513,243=>513,244=>513,245=>278,246=>513,247=>513,248=>222,249=>611,250=>944,251=>611,252=>513,253=>513,254=>513,255=>513);
+$cw=array(0=>500,1=>500,2=>500,3=>500,4=>500,5=>500,6=>500,7=>500,8=>500,9=>500,10=>500,11=>500,12=>500,13=>500,14=>500,15=>500,16=>500,17=>500,18=>500,19=>500,20=>500,21=>500,22=>500,23=>500,24=>500,25=>500,26=>500,27=>500,28=>500,29=>500,30=>500,31=>500,32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>277,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,127=>500,128=>655,129=>500,130=>222,131=>278,132=>333,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>250,140=>1000,141=>500,142=>611,143=>500,144=>500,145=>222,146=>221,147=>333,148=>333,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>500,155=>250,156=>938,157=>500,158=>500,159=>667,160=>278,161=>278,162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,168=>333,169=>737,170=>370,171=>448,172=>584,173=>333,174=>737,175=>333,176=>606,177=>584,178=>350,179=>350,180=>333,181=>556,182=>537,183=>278,184=>333,185=>350,186=>365,187=>448,188=>869,189=>869,190=>879,191=>556,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>666,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>896,231=>500,232=>556,233=>556,234=>556,235=>556,236=>251,237=>251,238=>251,239=>251,240=>556,241=>556,242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>555,255=>500);
+
// --- EOF ---
diff --git a/fonts/helveticab.php b/fonts/helveticab.php
index 7f2d8af..8d6047f 100644
--- a/fonts/helveticab.php
+++ b/fonts/helveticab.php
@@ -8,5 +8,5 @@ $dw=535;
$diff='';
$enc='';
$desc=array('Flags'=>32,'FontBBox'=>'[-170 -228 1003 962]','ItalicAngle'=>0,'Ascent'=>962,'Descent'=>-228,'Leading'=>0,'CapHeight'=>718,'XHeight'=>532,'StemV'=>140,'StemH'=>118,'AvgWidth'=>535,'MaxWidth'=>1000,'MissingWidth'=>535);
-$cw=array(0=>535,1=>535,2=>535,3=>535,4=>535,5=>535,6=>535,7=>535,8=>535,9=>535,10=>535,11=>535,12=>535,13=>535,14=>535,15=>535,16=>535,17=>535,18=>535,19=>535,20=>535,21=>535,22=>535,23=>535,24=>535,25=>535,26=>535,27=>535,28=>535,29=>535,30=>535,31=>535,32=>278,33=>333,34=>474,35=>556,36=>556,37=>889,38=>722,39=>278,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>333,59=>333,60=>584,61=>584,62=>584,63=>611,64=>975,65=>722,66=>722,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>556,75=>722,76=>611,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>333,92=>278,93=>333,94=>584,95=>556,96=>278,97=>556,98=>611,99=>556,100=>611,101=>556,102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,122=>500,123=>389,124=>280,125=>389,126=>584,127=>535,128=>535,129=>535,130=>535,131=>535,132=>535,133=>535,134=>535,135=>535,136=>535,137=>535,138=>535,139=>535,140=>535,141=>535,142=>535,143=>535,144=>535,145=>535,146=>535,147=>535,148=>535,149=>535,150=>535,151=>535,152=>535,153=>535,154=>535,155=>535,156=>535,157=>535,158=>535,159=>535,160=>535,161=>333,162=>556,163=>556,164=>167,165=>556,166=>556,167=>556,168=>556,169=>238,170=>500,171=>556,172=>333,173=>333,174=>611,175=>611,176=>535,177=>556,178=>556,179=>556,180=>278,181=>535,182=>556,183=>350,184=>278,185=>500,186=>500,187=>556,188=>1000,189=>1000,190=>535,191=>611,192=>535,193=>333,194=>333,195=>333,196=>333,197=>333,198=>333,199=>333,200=>333,201=>535,202=>333,203=>333,204=>535,205=>333,206=>333,207=>333,208=>1000,209=>535,210=>535,211=>535,212=>535,213=>535,214=>535,215=>535,216=>535,217=>535,218=>535,219=>535,220=>535,221=>535,222=>535,223=>535,224=>535,225=>1000,226=>535,227=>370,228=>535,229=>535,230=>535,231=>535,232=>611,233=>778,234=>1000,235=>365,236=>535,237=>535,238=>535,239=>535,240=>535,241=>889,242=>535,243=>535,244=>535,245=>278,246=>535,247=>535,248=>278,249=>611,250=>944,251=>611,252=>535,253=>535,254=>535,255=>535);
+$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>333,34=>474,35=>556,36=>556,37=>889,38=>722,39=>238,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>333,59=>333,60=>584,61=>584,62=>584,63=>611,64=>975,65=>722,66=>722,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>556,75=>722,76=>611,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>333,92=>278,93=>333,94=>584,95=>556,96=>333,97=>556,98=>611,99=>556,100=>611,101=>556,102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,122=>500,123=>389,124=>280,125=>389,126=>584,127=>350,128=>556,129=>350,130=>278,131=>556,132=>500,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>278,146=>278,147=>500,148=>500,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>556,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>280,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>611,182=>556,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>556,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>611,241=>611,242=>611,243=>611,244=>611,245=>611,246=>611,247=>584,248=>611,249=>611,250=>611,251=>611,252=>611,253=>556,254=>611,255=>556);
// --- EOF ---
diff --git a/fonts/helveticabi.php b/fonts/helveticabi.php
index 2cdb97e..e2ecf38 100644
--- a/fonts/helveticabi.php
+++ b/fonts/helveticabi.php
@@ -8,5 +8,5 @@ $dw=535;
$diff='';
$enc='';
$desc=array('Flags'=>96,'FontBBox'=>'[-174 -228 1114 962]','ItalicAngle'=>-12,'Ascent'=>962,'Descent'=>-228,'Leading'=>0,'CapHeight'=>718,'XHeight'=>532,'StemV'=>140,'StemH'=>118,'AvgWidth'=>535,'MaxWidth'=>1000,'MissingWidth'=>535);
-$cw=array(0=>535,1=>535,2=>535,3=>535,4=>535,5=>535,6=>535,7=>535,8=>535,9=>535,10=>535,11=>535,12=>535,13=>535,14=>535,15=>535,16=>535,17=>535,18=>535,19=>535,20=>535,21=>535,22=>535,23=>535,24=>535,25=>535,26=>535,27=>535,28=>535,29=>535,30=>535,31=>535,32=>278,33=>333,34=>474,35=>556,36=>556,37=>889,38=>722,39=>278,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>333,59=>333,60=>584,61=>584,62=>584,63=>611,64=>975,65=>722,66=>722,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>556,75=>722,76=>611,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>333,92=>278,93=>333,94=>584,95=>556,96=>278,97=>556,98=>611,99=>556,100=>611,101=>556,102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,122=>500,123=>389,124=>280,125=>389,126=>584,127=>535,128=>535,129=>535,130=>535,131=>535,132=>535,133=>535,134=>535,135=>535,136=>535,137=>535,138=>535,139=>535,140=>535,141=>535,142=>535,143=>535,144=>535,145=>535,146=>535,147=>535,148=>535,149=>535,150=>535,151=>535,152=>535,153=>535,154=>535,155=>535,156=>535,157=>535,158=>535,159=>535,160=>535,161=>333,162=>556,163=>556,164=>167,165=>556,166=>556,167=>556,168=>556,169=>238,170=>500,171=>556,172=>333,173=>333,174=>611,175=>611,176=>535,177=>556,178=>556,179=>556,180=>278,181=>535,182=>556,183=>350,184=>278,185=>500,186=>500,187=>556,188=>1000,189=>1000,190=>535,191=>611,192=>535,193=>333,194=>333,195=>333,196=>333,197=>333,198=>333,199=>333,200=>333,201=>535,202=>333,203=>333,204=>535,205=>333,206=>333,207=>333,208=>1000,209=>535,210=>535,211=>535,212=>535,213=>535,214=>535,215=>535,216=>535,217=>535,218=>535,219=>535,220=>535,221=>535,222=>535,223=>535,224=>535,225=>1000,226=>535,227=>370,228=>535,229=>535,230=>535,231=>535,232=>611,233=>778,234=>1000,235=>365,236=>535,237=>535,238=>535,239=>535,240=>535,241=>889,242=>535,243=>535,244=>535,245=>278,246=>535,247=>535,248=>278,249=>611,250=>944,251=>611,252=>535,253=>535,254=>535,255=>535);
+$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>333,34=>474,35=>556,36=>556,37=>889,38=>722,39=>238,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>333,59=>333,60=>584,61=>584,62=>584,63=>611,64=>975,65=>722,66=>722,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>556,75=>722,76=>611,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>333,92=>278,93=>333,94=>584,95=>556,96=>333,97=>556,98=>611,99=>556,100=>611,101=>556,102=>333,103=>611,104=>611,105=>278,106=>278,107=>556,108=>278,109=>889,110=>611,111=>611,112=>611,113=>611,114=>389,115=>556,116=>333,117=>611,118=>556,119=>778,120=>556,121=>556,122=>500,123=>389,124=>280,125=>389,126=>584,127=>350,128=>556,129=>350,130=>278,131=>556,132=>500,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>278,146=>278,147=>500,148=>500,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>556,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>280,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>611,182=>556,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>556,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>611,241=>611,242=>611,243=>611,244=>611,245=>611,246=>611,247=>584,248=>611,249=>611,250=>611,251=>611,252=>611,253=>556,254=>611,255=>556);
// --- EOF ---
diff --git a/fonts/helveticai.php b/fonts/helveticai.php
index 15e3903..0404aeb 100644
--- a/fonts/helveticai.php
+++ b/fonts/helveticai.php
@@ -8,5 +8,5 @@ $dw=513;
$diff='';
$enc='';
$desc=array('Flags'=>96,'FontBBox'=>'[-170 -225 1116 931]','ItalicAngle'=>-12,'Ascent'=>931,'Descent'=>-225,'Leading'=>0,'CapHeight'=>718,'XHeight'=>523,'StemV'=>88,'StemH'=>76,'AvgWidth'=>513,'MaxWidth'=>1015,'MissingWidth'=>513);
-$cw=array(0=>513,1=>513,2=>513,3=>513,4=>513,5=>513,6=>513,7=>513,8=>513,9=>513,10=>513,11=>513,12=>513,13=>513,14=>513,15=>513,16=>513,17=>513,18=>513,19=>513,20=>513,21=>513,22=>513,23=>513,24=>513,25=>513,26=>513,27=>513,28=>513,29=>513,30=>513,31=>513,32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>222,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>278,94=>469,95=>556,96=>222,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,127=>513,128=>513,129=>513,130=>513,131=>513,132=>513,133=>513,134=>513,135=>513,136=>513,137=>513,138=>513,139=>513,140=>513,141=>513,142=>513,143=>513,144=>513,145=>513,146=>513,147=>513,148=>513,149=>513,150=>513,151=>513,152=>513,153=>513,154=>513,155=>513,156=>513,157=>513,158=>513,159=>513,160=>513,161=>333,162=>556,163=>556,164=>167,165=>556,166=>556,167=>556,168=>556,169=>191,170=>333,171=>556,172=>333,173=>333,174=>500,175=>500,176=>513,177=>556,178=>556,179=>556,180=>278,181=>513,182=>537,183=>350,184=>222,185=>333,186=>333,187=>556,188=>1000,189=>1000,190=>513,191=>611,192=>513,193=>333,194=>333,195=>333,196=>333,197=>333,198=>333,199=>333,200=>333,201=>513,202=>333,203=>333,204=>513,205=>333,206=>333,207=>333,208=>1000,209=>513,210=>513,211=>513,212=>513,213=>513,214=>513,215=>513,216=>513,217=>513,218=>513,219=>513,220=>513,221=>513,222=>513,223=>513,224=>513,225=>1000,226=>513,227=>370,228=>513,229=>513,230=>513,231=>513,232=>556,233=>778,234=>1000,235=>365,236=>513,237=>513,238=>513,239=>513,240=>513,241=>889,242=>513,243=>513,244=>513,245=>278,246=>513,247=>513,248=>222,249=>611,250=>944,251=>611,252=>513,253=>513,254=>513,255=>513);
+$cw=array(0=>278,1=>278,2=>278,3=>278,4=>278,5=>278,6=>278,7=>278,8=>278,9=>278,10=>278,11=>278,12=>278,13=>278,14=>278,15=>278,16=>278,17=>278,18=>278,19=>278,20=>278,21=>278,22=>278,23=>278,24=>278,25=>278,26=>278,27=>278,28=>278,29=>278,30=>278,31=>278,32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278,48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556,64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778,80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>278,94=>469,95=>556,96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556,112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,127=>350,128=>556,129=>350,130=>222,131=>556,132=>333,133=>1000,134=>556,135=>556,136=>333,137=>1000,138=>667,139=>333,140=>1000,141=>350,142=>611,143=>350,144=>350,145=>222,146=>222,147=>333,148=>333,149=>350,150=>556,151=>1000,152=>333,153=>1000,154=>500,155=>333,156=>944,157=>350,158=>500,159=>667,160=>278,161=>333,162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>333,176=>400,177=>584,178=>333,179=>333,180=>333,181=>556,182=>537,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556,226=>556,227=>556,228=>556,229=>556,230=>889,231=>500,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>556,241=>556,242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500);
// --- EOF ---
diff --git a/fonts/times.php b/fonts/times.php
index 4d93423..cfcaf06 100644
--- a/fonts/times.php
+++ b/fonts/times.php
@@ -8,5 +8,5 @@ $dw=495;
$diff='';
$enc='';
$desc=array('Flags'=>32,'FontBBox'=>'[-168 -218 1000 898]','ItalicAngle'=>0,'Ascent'=>898,'Descent'=>-218,'Leading'=>0,'CapHeight'=>662,'XHeight'=>450,'StemV'=>84,'StemH'=>28,'AvgWidth'=>495,'MaxWidth'=>1000,'MissingWidth'=>495);
-$cw=array(0=>495,1=>495,2=>495,3=>495,4=>495,5=>495,6=>495,7=>495,8=>495,9=>495,10=>495,11=>495,12=>495,13=>495,14=>495,15=>495,16=>495,17=>495,18=>495,19=>495,20=>495,21=>495,22=>495,23=>495,24=>495,25=>495,26=>495,27=>495,28=>495,29=>495,30=>495,31=>495,32=>250,33=>333,34=>408,35=>500,36=>500,37=>833,38=>778,39=>333,40=>333,41=>333,42=>500,43=>564,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>278,59=>278,60=>564,61=>564,62=>564,63=>444,64=>921,65=>722,66=>667,67=>667,68=>722,69=>611,70=>556,71=>722,72=>722,73=>333,74=>389,75=>722,76=>611,77=>889,78=>722,79=>722,80=>556,81=>722,82=>667,83=>556,84=>611,85=>722,86=>722,87=>944,88=>722,89=>722,90=>611,91=>333,92=>278,93=>333,94=>469,95=>500,96=>333,97=>444,98=>500,99=>444,100=>500,101=>444,102=>333,103=>500,104=>500,105=>278,106=>278,107=>500,108=>278,109=>778,110=>500,111=>500,112=>500,113=>500,114=>333,115=>389,116=>278,117=>500,118=>500,119=>722,120=>500,121=>500,122=>444,123=>480,124=>200,125=>480,126=>541,127=>495,128=>495,129=>495,130=>495,131=>495,132=>495,133=>495,134=>495,135=>495,136=>495,137=>495,138=>495,139=>495,140=>495,141=>495,142=>495,143=>495,144=>495,145=>495,146=>495,147=>495,148=>495,149=>495,150=>495,151=>495,152=>495,153=>495,154=>495,155=>495,156=>495,157=>495,158=>495,159=>495,160=>495,161=>333,162=>500,163=>500,164=>167,165=>500,166=>500,167=>500,168=>500,169=>180,170=>444,171=>500,172=>333,173=>333,174=>556,175=>556,176=>495,177=>500,178=>500,179=>500,180=>250,181=>495,182=>453,183=>350,184=>333,185=>444,186=>444,187=>500,188=>1000,189=>1000,190=>495,191=>444,192=>495,193=>333,194=>333,195=>333,196=>333,197=>333,198=>333,199=>333,200=>333,201=>495,202=>333,203=>333,204=>495,205=>333,206=>333,207=>333,208=>1000,209=>495,210=>495,211=>495,212=>495,213=>495,214=>495,215=>495,216=>495,217=>495,218=>495,219=>495,220=>495,221=>495,222=>495,223=>495,224=>495,225=>889,226=>495,227=>276,228=>495,229=>495,230=>495,231=>495,232=>611,233=>722,234=>889,235=>310,236=>495,237=>495,238=>495,239=>495,240=>495,241=>667,242=>495,243=>495,244=>495,245=>278,246=>495,247=>495,248=>278,249=>500,250=>722,251=>500,252=>495,253=>495,254=>495,255=>495);
+$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>333,34=>408,35=>500,36=>500,37=>833,38=>778,39=>180,40=>333,41=>333,42=>500,43=>564,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>278,59=>278,60=>564,61=>564,62=>564,63=>444,64=>921,65=>722,66=>667,67=>667,68=>722,69=>611,70=>556,71=>722,72=>722,73=>333,74=>389,75=>722,76=>611,77=>889,78=>722,79=>722,80=>556,81=>722,82=>667,83=>556,84=>611,85=>722,86=>722,87=>944,88=>722,89=>722,90=>611,91=>333,92=>278,93=>333,94=>469,95=>500,96=>333,97=>444,98=>500,99=>444,100=>500,101=>444,102=>333,103=>500,104=>500,105=>278,106=>278,107=>500,108=>278,109=>778,110=>500,111=>500,112=>500,113=>500,114=>333,115=>389,116=>278,117=>500,118=>500,119=>722,120=>500,121=>500,122=>444,123=>480,124=>200,125=>480,126=>541,127=>350,128=>500,129=>350,130=>333,131=>500,132=>444,133=>1000,134=>500,135=>500,136=>333,137=>1000,138=>556,139=>333,140=>889,141=>350,142=>611,143=>350,144=>350,145=>333,146=>333,147=>444,148=>444,149=>350,150=>500,151=>1000,152=>333,153=>980,154=>389,155=>333,156=>722,157=>350,158=>444,159=>722,160=>250,161=>333,162=>500,163=>500,164=>500,165=>500,166=>200,167=>500,168=>333,169=>760,170=>276,171=>500,172=>564,173=>333,174=>760,175=>333,176=>400,177=>564,178=>300,179=>300,180=>333,181=>500,182=>453,183=>250,184=>333,185=>300,186=>310,187=>500,188=>750,189=>750,190=>750,191=>444,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>889,199=>667,200=>611,201=>611,202=>611,203=>611,204=>333,205=>333,206=>333,207=>333,208=>722,209=>722,210=>722,211=>722,212=>722,213=>722,214=>722,215=>564,216=>722,217=>722,218=>722,219=>722,220=>722,221=>722,222=>556,223=>500,224=>444,225=>444,226=>444,227=>444,228=>444,229=>444,230=>667,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>500,242=>500,243=>500,244=>500,245=>500,246=>500,247=>564,248=>500,249=>500,250=>500,251=>500,252=>500,253=>500,254=>500,255=>500);
// --- EOF ---
diff --git a/fonts/timesb.php b/fonts/timesb.php
index 7c422a3..9c41a7b 100644
--- a/fonts/timesb.php
+++ b/fonts/timesb.php
@@ -8,5 +8,5 @@ $dw=516;
$diff='';
$enc='';
$desc=array('Flags'=>32,'FontBBox'=>'[-168 -218 1000 935]','ItalicAngle'=>0,'Ascent'=>935,'Descent'=>-218,'Leading'=>0,'CapHeight'=>676,'XHeight'=>461,'StemV'=>139,'StemH'=>44,'AvgWidth'=>516,'MaxWidth'=>1000,'MissingWidth'=>516);
-$cw=array(0=>516,1=>516,2=>516,3=>516,4=>516,5=>516,6=>516,7=>516,8=>516,9=>516,10=>516,11=>516,12=>516,13=>516,14=>516,15=>516,16=>516,17=>516,18=>516,19=>516,20=>516,21=>516,22=>516,23=>516,24=>516,25=>516,26=>516,27=>516,28=>516,29=>516,30=>516,31=>516,32=>250,33=>333,34=>555,35=>500,36=>500,37=>1000,38=>833,39=>333,40=>333,41=>333,42=>500,43=>570,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>570,61=>570,62=>570,63=>500,64=>930,65=>722,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>778,73=>389,74=>500,75=>778,76=>667,77=>944,78=>722,79=>778,80=>611,81=>778,82=>722,83=>556,84=>667,85=>722,86=>722,87=>1000,88=>722,89=>722,90=>667,91=>333,92=>278,93=>333,94=>581,95=>500,96=>333,97=>500,98=>556,99=>444,100=>556,101=>444,102=>333,103=>500,104=>556,105=>278,106=>333,107=>556,108=>278,109=>833,110=>556,111=>500,112=>556,113=>556,114=>444,115=>389,116=>333,117=>556,118=>500,119=>722,120=>500,121=>500,122=>444,123=>394,124=>220,125=>394,126=>520,127=>516,128=>516,129=>516,130=>516,131=>516,132=>516,133=>516,134=>516,135=>516,136=>516,137=>516,138=>516,139=>516,140=>516,141=>516,142=>516,143=>516,144=>516,145=>516,146=>516,147=>516,148=>516,149=>516,150=>516,151=>516,152=>516,153=>516,154=>516,155=>516,156=>516,157=>516,158=>516,159=>516,160=>516,161=>333,162=>500,163=>500,164=>167,165=>500,166=>500,167=>500,168=>500,169=>278,170=>500,171=>500,172=>333,173=>333,174=>556,175=>556,176=>516,177=>500,178=>500,179=>500,180=>250,181=>516,182=>540,183=>350,184=>333,185=>500,186=>500,187=>500,188=>1000,189=>1000,190=>516,191=>500,192=>516,193=>333,194=>333,195=>333,196=>333,197=>333,198=>333,199=>333,200=>333,201=>516,202=>333,203=>333,204=>516,205=>333,206=>333,207=>333,208=>1000,209=>516,210=>516,211=>516,212=>516,213=>516,214=>516,215=>516,216=>516,217=>516,218=>516,219=>516,220=>516,221=>516,222=>516,223=>516,224=>516,225=>1000,226=>516,227=>300,228=>516,229=>516,230=>516,231=>516,232=>667,233=>778,234=>1000,235=>330,236=>516,237=>516,238=>516,239=>516,240=>516,241=>722,242=>516,243=>516,244=>516,245=>278,246=>516,247=>516,248=>278,249=>500,250=>722,251=>556,252=>516,253=>516,254=>516,255=>516);
+$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>333,34=>555,35=>500,36=>500,37=>1000,38=>833,39=>278,40=>333,41=>333,42=>500,43=>570,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>570,61=>570,62=>570,63=>500,64=>930,65=>722,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>778,73=>389,74=>500,75=>778,76=>667,77=>944,78=>722,79=>778,80=>611,81=>778,82=>722,83=>556,84=>667,85=>722,86=>722,87=>1000,88=>722,89=>722,90=>667,91=>333,92=>278,93=>333,94=>581,95=>500,96=>333,97=>500,98=>556,99=>444,100=>556,101=>444,102=>333,103=>500,104=>556,105=>278,106=>333,107=>556,108=>278,109=>833,110=>556,111=>500,112=>556,113=>556,114=>444,115=>389,116=>333,117=>556,118=>500,119=>722,120=>500,121=>500,122=>444,123=>394,124=>220,125=>394,126=>520,127=>350,128=>500,129=>350,130=>333,131=>500,132=>500,133=>1000,134=>500,135=>500,136=>333,137=>1000,138=>556,139=>333,140=>1000,141=>350,142=>667,143=>350,144=>350,145=>333,146=>333,147=>500,148=>500,149=>350,150=>500,151=>1000,152=>333,153=>1000,154=>389,155=>333,156=>722,157=>350,158=>444,159=>722,160=>250,161=>333,162=>500,163=>500,164=>500,165=>500,166=>220,167=>500,168=>333,169=>747,170=>300,171=>500,172=>570,173=>333,174=>747,175=>333,176=>400,177=>570,178=>300,179=>300,180=>333,181=>556,182=>540,183=>250,184=>333,185=>300,186=>330,187=>500,188=>750,189=>750,190=>750,191=>500,192=>722,193=>722,194=>722,195=>722,196=>722,197=>722,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>389,205=>389,206=>389,207=>389,208=>722,209=>722,210=>778,211=>778,212=>778,213=>778,214=>778,215=>570,216=>778,217=>722,218=>722,219=>722,220=>722,221=>722,222=>611,223=>556,224=>500,225=>500,226=>500,227=>500,228=>500,229=>500,230=>722,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>556,242=>500,243=>500,244=>500,245=>500,246=>500,247=>570,248=>500,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500);
// --- EOF ---
diff --git a/fonts/timesbi.php b/fonts/timesbi.php
index 99ca55a..4feed74 100644
--- a/fonts/timesbi.php
+++ b/fonts/timesbi.php
@@ -8,5 +8,5 @@ $dw=501;
$diff='';
$enc='';
$desc=array('Flags'=>96,'FontBBox'=>'[-200 -218 996 921]','ItalicAngle'=>-15,'Ascent'=>921,'Descent'=>-218,'Leading'=>0,'CapHeight'=>669,'XHeight'=>462,'StemV'=>121,'StemH'=>42,'AvgWidth'=>501,'MaxWidth'=>1000,'MissingWidth'=>501);
-$cw=array(0=>501,1=>501,2=>501,3=>501,4=>501,5=>501,6=>501,7=>501,8=>501,9=>501,10=>501,11=>501,12=>501,13=>501,14=>501,15=>501,16=>501,17=>501,18=>501,19=>501,20=>501,21=>501,22=>501,23=>501,24=>501,25=>501,26=>501,27=>501,28=>501,29=>501,30=>501,31=>501,32=>250,33=>389,34=>555,35=>500,36=>500,37=>833,38=>778,39=>333,40=>333,41=>333,42=>500,43=>570,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>570,61=>570,62=>570,63=>500,64=>832,65=>667,66=>667,67=>667,68=>722,69=>667,70=>667,71=>722,72=>778,73=>389,74=>500,75=>667,76=>611,77=>889,78=>722,79=>722,80=>611,81=>722,82=>667,83=>556,84=>611,85=>722,86=>667,87=>889,88=>667,89=>611,90=>611,91=>333,92=>278,93=>333,94=>570,95=>500,96=>333,97=>500,98=>500,99=>444,100=>500,101=>444,102=>333,103=>500,104=>556,105=>278,106=>278,107=>500,108=>278,109=>778,110=>556,111=>500,112=>500,113=>500,114=>389,115=>389,116=>278,117=>556,118=>444,119=>667,120=>500,121=>444,122=>389,123=>348,124=>220,125=>348,126=>570,127=>501,128=>501,129=>501,130=>501,131=>501,132=>501,133=>501,134=>501,135=>501,136=>501,137=>501,138=>501,139=>501,140=>501,141=>501,142=>501,143=>501,144=>501,145=>501,146=>501,147=>501,148=>501,149=>501,150=>501,151=>501,152=>501,153=>501,154=>501,155=>501,156=>501,157=>501,158=>501,159=>501,160=>501,161=>389,162=>500,163=>500,164=>167,165=>500,166=>500,167=>500,168=>500,169=>278,170=>500,171=>500,172=>333,173=>333,174=>556,175=>556,176=>501,177=>500,178=>500,179=>500,180=>250,181=>501,182=>500,183=>350,184=>333,185=>500,186=>500,187=>500,188=>1000,189=>1000,190=>501,191=>500,192=>501,193=>333,194=>333,195=>333,196=>333,197=>333,198=>333,199=>333,200=>333,201=>501,202=>333,203=>333,204=>501,205=>333,206=>333,207=>333,208=>1000,209=>501,210=>501,211=>501,212=>501,213=>501,214=>501,215=>501,216=>501,217=>501,218=>501,219=>501,220=>501,221=>501,222=>501,223=>501,224=>501,225=>944,226=>501,227=>266,228=>501,229=>501,230=>501,231=>501,232=>611,233=>722,234=>944,235=>300,236=>501,237=>501,238=>501,239=>501,240=>501,241=>722,242=>501,243=>501,244=>501,245=>278,246=>501,247=>501,248=>278,249=>500,250=>722,251=>500,252=>501,253=>501,254=>501,255=>501);
+$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>389,34=>555,35=>500,36=>500,37=>833,38=>778,39=>278,40=>333,41=>333,42=>500,43=>570,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>570,61=>570,62=>570,63=>500,64=>832,65=>667,66=>667,67=>667,68=>722,69=>667,70=>667,71=>722,72=>778,73=>389,74=>500,75=>667,76=>611,77=>889,78=>722,79=>722,80=>611,81=>722,82=>667,83=>556,84=>611,85=>722,86=>667,87=>889,88=>667,89=>611,90=>611,91=>333,92=>278,93=>333,94=>570,95=>500,96=>333,97=>500,98=>500,99=>444,100=>500,101=>444,102=>333,103=>500,104=>556,105=>278,106=>278,107=>500,108=>278,109=>778,110=>556,111=>500,112=>500,113=>500,114=>389,115=>389,116=>278,117=>556,118=>444,119=>667,120=>500,121=>444,122=>389,123=>348,124=>220,125=>348,126=>570,127=>350,128=>500,129=>350,130=>333,131=>500,132=>500,133=>1000,134=>500,135=>500,136=>333,137=>1000,138=>556,139=>333,140=>944,141=>350,142=>611,143=>350,144=>350,145=>333,146=>333,147=>500,148=>500,149=>350,150=>500,151=>1000,152=>333,153=>1000,154=>389,155=>333,156=>722,157=>350,158=>389,159=>611,160=>250,161=>389,162=>500,163=>500,164=>500,165=>500,166=>220,167=>500,168=>333,169=>747,170=>266,171=>500,172=>606,173=>333,174=>747,175=>333,176=>400,177=>570,178=>300,179=>300,180=>333,181=>576,182=>500,183=>250,184=>333,185=>300,186=>300,187=>500,188=>750,189=>750,190=>750,191=>500,192=>667,193=>667,194=>667,195=>667,196=>667,197=>667,198=>944,199=>667,200=>667,201=>667,202=>667,203=>667,204=>389,205=>389,206=>389,207=>389,208=>722,209=>722,210=>722,211=>722,212=>722,213=>722,214=>722,215=>570,216=>722,217=>722,218=>722,219=>722,220=>722,221=>611,222=>611,223=>500,224=>500,225=>500,226=>500,227=>500,228=>500,229=>500,230=>722,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>556,242=>500,243=>500,244=>500,245=>500,246=>500,247=>570,248=>500,249=>556,250=>556,251=>556,252=>556,253=>444,254=>500,255=>444);
// --- EOF ---
diff --git a/fonts/timesi.php b/fonts/timesi.php
index 2dc736c..1e8b673 100644
--- a/fonts/timesi.php
+++ b/fonts/timesi.php
@@ -8,5 +8,5 @@ $dw=491;
$diff='';
$enc='';
$desc=array('Flags'=>96,'FontBBox'=>'[-169 -217 1010 883]','ItalicAngle'=>-15.5,'Ascent'=>883,'Descent'=>-217,'Leading'=>0,'CapHeight'=>653,'XHeight'=>441,'StemV'=>76,'StemH'=>32,'AvgWidth'=>491,'MaxWidth'=>1000,'MissingWidth'=>491);
-$cw=array(0=>491,1=>491,2=>491,3=>491,4=>491,5=>491,6=>491,7=>491,8=>491,9=>491,10=>491,11=>491,12=>491,13=>491,14=>491,15=>491,16=>491,17=>491,18=>491,19=>491,20=>491,21=>491,22=>491,23=>491,24=>491,25=>491,26=>491,27=>491,28=>491,29=>491,30=>491,31=>491,32=>250,33=>333,34=>420,35=>500,36=>500,37=>833,38=>778,39=>333,40=>333,41=>333,42=>500,43=>675,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>675,61=>675,62=>675,63=>500,64=>920,65=>611,66=>611,67=>667,68=>722,69=>611,70=>611,71=>722,72=>722,73=>333,74=>444,75=>667,76=>556,77=>833,78=>667,79=>722,80=>611,81=>722,82=>611,83=>500,84=>556,85=>722,86=>611,87=>833,88=>611,89=>556,90=>556,91=>389,92=>278,93=>389,94=>422,95=>500,96=>333,97=>500,98=>500,99=>444,100=>500,101=>444,102=>278,103=>500,104=>500,105=>278,106=>278,107=>444,108=>278,109=>722,110=>500,111=>500,112=>500,113=>500,114=>389,115=>389,116=>278,117=>500,118=>444,119=>667,120=>444,121=>444,122=>389,123=>400,124=>275,125=>400,126=>541,127=>491,128=>491,129=>491,130=>491,131=>491,132=>491,133=>491,134=>491,135=>491,136=>491,137=>491,138=>491,139=>491,140=>491,141=>491,142=>491,143=>491,144=>491,145=>491,146=>491,147=>491,148=>491,149=>491,150=>491,151=>491,152=>491,153=>491,154=>491,155=>491,156=>491,157=>491,158=>491,159=>491,160=>491,161=>389,162=>500,163=>500,164=>167,165=>500,166=>500,167=>500,168=>500,169=>214,170=>556,171=>500,172=>333,173=>333,174=>500,175=>500,176=>491,177=>500,178=>500,179=>500,180=>250,181=>491,182=>523,183=>350,184=>333,185=>556,186=>556,187=>500,188=>889,189=>1000,190=>491,191=>500,192=>491,193=>333,194=>333,195=>333,196=>333,197=>333,198=>333,199=>333,200=>333,201=>491,202=>333,203=>333,204=>491,205=>333,206=>333,207=>333,208=>889,209=>491,210=>491,211=>491,212=>491,213=>491,214=>491,215=>491,216=>491,217=>491,218=>491,219=>491,220=>491,221=>491,222=>491,223=>491,224=>491,225=>889,226=>491,227=>276,228=>491,229=>491,230=>491,231=>491,232=>556,233=>722,234=>944,235=>310,236=>491,237=>491,238=>491,239=>491,240=>491,241=>667,242=>491,243=>491,244=>491,245=>278,246=>491,247=>491,248=>278,249=>500,250=>667,251=>500,252=>491,253=>491,254=>491,255=>491);
+$cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250,10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250,20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250,30=>250,31=>250,32=>250,33=>333,34=>420,35=>500,36=>500,37=>833,38=>778,39=>214,40=>333,41=>333,42=>500,43=>675,44=>250,45=>333,46=>250,47=>278,48=>500,49=>500,50=>500,51=>500,52=>500,53=>500,54=>500,55=>500,56=>500,57=>500,58=>333,59=>333,60=>675,61=>675,62=>675,63=>500,64=>920,65=>611,66=>611,67=>667,68=>722,69=>611,70=>611,71=>722,72=>722,73=>333,74=>444,75=>667,76=>556,77=>833,78=>667,79=>722,80=>611,81=>722,82=>611,83=>500,84=>556,85=>722,86=>611,87=>833,88=>611,89=>556,90=>556,91=>389,92=>278,93=>389,94=>422,95=>500,96=>333,97=>500,98=>500,99=>444,100=>500,101=>444,102=>278,103=>500,104=>500,105=>278,106=>278,107=>444,108=>278,109=>722,110=>500,111=>500,112=>500,113=>500,114=>389,115=>389,116=>278,117=>500,118=>444,119=>667,120=>444,121=>444,122=>389,123=>400,124=>275,125=>400,126=>541,127=>350,128=>500,129=>350,130=>333,131=>500,132=>556,133=>889,134=>500,135=>500,136=>333,137=>1000,138=>500,139=>333,140=>944,141=>350,142=>556,143=>350,144=>350,145=>333,146=>333,147=>556,148=>556,149=>350,150=>500,151=>889,152=>333,153=>980,154=>389,155=>333,156=>667,157=>350,158=>389,159=>556,160=>250,161=>389,162=>500,163=>500,164=>500,165=>500,166=>275,167=>500,168=>333,169=>760,170=>276,171=>500,172=>675,173=>333,174=>760,175=>333,176=>400,177=>675,178=>300,179=>300,180=>333,181=>500,182=>523,183=>250,184=>333,185=>300,186=>310,187=>500,188=>750,189=>750,190=>750,191=>500,192=>611,193=>611,194=>611,195=>611,196=>611,197=>611,198=>889,199=>667,200=>611,201=>611,202=>611,203=>611,204=>333,205=>333,206=>333,207=>333,208=>722,209=>667,210=>722,211=>722,212=>722,213=>722,214=>722,215=>675,216=>722,217=>722,218=>722,219=>722,220=>722,221=>556,222=>611,223=>500,224=>500,225=>500,226=>500,227=>500,228=>500,229=>500,230=>667,231=>444,232=>444,233=>444,234=>444,235=>444,236=>278,237=>278,238=>278,239=>278,240=>500,241=>500,242=>500,243=>500,244=>500,245=>500,246=>500,247=>675,248=>500,249=>500,250=>500,251=>500,252=>500,253=>444,254=>500,255=>444);
// --- EOF ---
diff --git a/tcpdf.php b/tcpdf.php
index 35c32dc..d066194 100755
--- a/tcpdf.php
+++ b/tcpdf.php
@@ -1,9 +1,9 @@
no external libraries are required for the basic functions;
* all standard page formats, custom page formats, custom margins and units of measure;
* UTF-8 Unicode and Right-To-Left languages;
- * TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;
+ * TrueTypeUnicode, TrueType, Type1 and CID-0 fonts;
* font subsetting;
* methods to publish some XHTML + CSS code, Javascript and Forms;
* images, graphic (geometric figures) and transformation methods;
@@ -137,7 +137,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.
* @package com.tecnick.tcpdf
* @author Nicola Asuni
- * @version 5.9.128
+ * @version 5.9.129
*/
// Main configuration file. Define the K_TCPDF_EXTERNAL_CONFIG constant to skip this file.
@@ -149,7 +149,7 @@ require_once(dirname(__FILE__).'/config/tcpdf_config.php');
* TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
* @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions.
- * @version 5.9.128
+ * @version 5.9.129
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF {
@@ -160,7 +160,7 @@ class TCPDF {
* Current TCPDF version.
* @private
*/
- private $tcpdf_version = '5.9.128';
+ private $tcpdf_version = '5.9.129';
// Protected properties
@@ -4816,7 +4816,7 @@ class TCPDF {
$prev_FontFamily = $this->FontFamily;
$prev_FontStyle = $this->FontStyle;
$prev_FontSizePt = $this->FontSizePt;
- $this->SetFont($fontname, $fontstyle, $fontsize);
+ $this->SetFont($fontname, $fontstyle, $fontsize, '', 'default', false);
}
// convert UTF-8 array to Latin1 if required
$sa = $this->UTF8ArrToLatin1($sa);
@@ -4830,7 +4830,7 @@ class TCPDF {
}
// restore previous values
if (!$this->empty_string($fontname)) {
- $this->SetFont($prev_FontFamily, $prev_FontStyle, $prev_FontSizePt);
+ $this->SetFont($prev_FontFamily, $prev_FontStyle, $prev_FontSizePt, '', 'default', false);
}
if ($getarray) {
return $wa;
@@ -5193,12 +5193,13 @@ class TCPDF {
* @param $size (float) Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12
* @param $fontfile (string) The font definition file. By default, the name is built from the family and style, in lower case with no spaces.
* @param $subset (mixed) if true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font.
+ * @param $out (boolean) if true output the font size command, otherwise only set the font properties.
* @author Nicola Asuni
* @public
* @since 1.0
* @see AddFont(), SetFontSize()
*/
- public function SetFont($family, $style='', $size=0, $fontfile='', $subset='default') {
+ public function SetFont($family, $style='', $size=0, $fontfile='', $subset='default', $out=true) {
//Select a font; size given in points
if ($size == 0) {
$size = $this->FontSizePt;
@@ -5208,12 +5209,12 @@ class TCPDF {
$this->FontFamily = $fontdata['family'];
$this->FontStyle = $fontdata['style'];
$this->CurrentFont = $this->getFontBuffer($fontdata['fontkey']);
- $this->SetFontSize($size);
+ $this->SetFontSize($size, $out);
}
/**
* Defines the size of the current font.
- * @param $size (float) The size (in points)
+ * @param $size (float) The font size in points.
* @param $out (boolean) if true output the font size command, otherwise only set the font properties.
* @public
* @since 1.0
@@ -5246,8 +5247,8 @@ class TCPDF {
} elseif (!isset($font_ascent)) {
$font_ascent = $font_height - $font_descent;
}
- $this->FontAscent = $font_ascent / $this->k;
- $this->FontDescent = $font_descent / $this->k;
+ $this->FontAscent = ($font_ascent / $this->k);
+ $this->FontDescent = ($font_descent / $this->k);
if ($out AND ($this->page > 0) AND (isset($this->CurrentFont['i']))) {
$this->_out(sprintf('BT /F%d %.2F Tf ET', $this->CurrentFont['i'], $this->FontSizePt));
}
@@ -6567,9 +6568,23 @@ class TCPDF {
} // end for each page
// Get end-of-cell Y position
$currentY = $this->GetY();
- // restore original margin values
- $this->SetLeftMargin($lMargin);
- $this->SetRightMargin($rMargin);
+ // restore previous values
+ if ($this->num_columns > 1) {
+ $this->selectColumn();
+ } else {
+ // restore original margins
+ $this->lMargin = $lMargin;
+ $this->rMargin = $rMargin;
+ if ($this->page > $startpage) {
+ // check for margin variations between pages (i.e. booklet mode)
+ $dl = ($this->pagedim[$this->page]['olm'] - $this->pagedim[$startpage]['olm']);
+ $dr = ($this->pagedim[$this->page]['orm'] - $this->pagedim[$startpage]['orm']);
+ if (($dl != 0) OR ($dr != 0)) {
+ $this->lMargin += $dl;
+ $this->rMargin += $dr;
+ }
+ }
+ }
if ($ln > 0) {
//Go to the beginning of the next line
$this->SetY($currentY + $mc_margin['B']);
@@ -9040,7 +9055,7 @@ class TCPDF {
$annots .= ' /FT /Btn';
$annots .= ' /Kids [';
foreach ($this->radiobutton_groups[$n][$pl['txt']] as $key => $data) {
- if (($key !== 'n') AND ($key != '#readonly#')) {
+ if (isset($data['kid'])) {
$annots .= ' '.$data['kid'].' 0 R';
if ($data['def'] !== 'Off') {
$defval = $data['def'];
@@ -9497,8 +9512,6 @@ class TCPDF {
}
if (isset($pl['opt']['mk']['tp']) AND ($pl['opt']['mk']['tp'] >= 0) AND ($pl['opt']['mk']['tp'] <= 6)) {
$annots .= ' /TP '.intval($pl['opt']['mk']['tp']);
- } else {
- $annots .= ' /TP 0';
}
$annots .= '>>';
} // end MK
@@ -9637,7 +9650,7 @@ class TCPDF {
}
/**
- * Put appearance streams XObject used to define annotation's appearance states
+ * Put appearance streams XObject used to define annotation's appearance states.
* @param $w (int) annotation width
* @param $h (int) annotation height
* @param $stream (string) appearance stream
@@ -9660,14 +9673,7 @@ class TCPDF {
$rect = sprintf('%.2F %.2F', $w, $h);
$out .= ' /BBox [0 0 '.$rect.']';
$out .= ' /Matrix [1 0 0 1 0 0]';
- $out .= ' /Resources <<';
- $out .= ' /ProcSet [/PDF /Text]';
- $out .= ' /Font <<';
- foreach ($this->annotation_fonts as $fontkey => $fontid) {
- $out .= ' /F'.$fontid.' '.$this->font_obj_ids[$fontkey].' 0 R';
- }
- $out .= ' >>';
- $out .= ' >>';
+ $out .= ' /Resources 2 0 R';
$stream = $this->_getrawstream($stream);
$out .= ' /Length '.strlen($stream);
$out .= ' >>';
@@ -9803,10 +9809,10 @@ class TCPDF {
}
/**
- * Convert and add the selected TTF/OTF font to the fonts folder (that must be writeable).
- * @param $fontfile (string) TrueType font file (full path).
+ * Convert and add the selected TrueType or Type1 font to the fonts folder (that must be writeable).
+ * @param $fontfile (string) TrueType or Type1 font file (full path).
* @param $fonttype (string) Font type. Leave empty for autodetect mode. Valid values are: TrueTypeUnicode, TrueType, Type1, CID0JP = CID-0 Japanese, CID0KR = CID-0 Korean, CID0CS = CID-0 Chinese Simplified, CID0CT = CID-0 Chinese Traditional.
- * @param $enc (string) Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode, OpenType Unicode and symbolic fonts like Symbol or ZapfDingBats.
+ * @param $enc (string) Name of the encoding table to use. Leave empty for default mode. Omit this parameter for TrueType Unicode and symbolic fonts like Symbol or ZapfDingBats.
* @param $flags (int) Unsigned 32-bit integer containing flags specifying various characteristics of the font (PDF32000:2008 - 9.8.2 Font Descriptor Flags): +1 for fixed font; +4 for symbol or +32 for non-symbol; +64 for italic. Fixed and Italic mode are generally autodetected so you have to set it to 32 = non-symbolic font (default) or 4 = symbolic font.
* @param $outpath (string) Output path for generated font files (must be writeable by the web server). Leave empty for default font folder.
* @return (string) TCPDF font name.
@@ -9853,6 +9859,9 @@ class TCPDF {
if ($this->_getULONG($font, 0) == 0x10000) {
// True Type (Unicode or not)
$fonttype = 'TrueTypeUnicode';
+ } elseif (substr($font, 0, 4) == 'OTTO') {
+ // Open Type (Unicode or not)
+ $this->Error('Unsupported font format: OpenType with CFF data.');
} else {
// Type 1
$fonttype = 'Type1';
@@ -10590,7 +10599,7 @@ class TCPDF {
}
}
} else {
- // TrueType or OpenType
+ // TrueType
$pfile .= '$enc=\''.$fmetric['enc'].'\';'."\n";
$pfile .= '$file=\''.$fmetric['file'].'\';'."\n";
$pfile .= '$ctg=\''.$fmetric['ctg'].'\';'."\n";
@@ -12474,10 +12483,8 @@ class TCPDF {
}
}
$out .= ' /Fields ['.$objrefs.']';
- if (!empty($this->form_obj_id) AND !$this->sign) {
- // It's better to turn off this value and set the appearance stream for each annotation (/AP) to avoid conflicts with signature fields.
- $out .= ' /NeedAppearances true';
- }
+ // It's better to turn off this value and set the appearance stream for each annotation (/AP) to avoid conflicts with signature fields.
+ $out .= ' /NeedAppearances false';
if ($this->sign AND isset($this->signature_data['cert_type'])) {
if ($this->signature_data['cert_type'] > 0) {
$out .= ' /SigFlags 3';
@@ -16655,7 +16662,7 @@ class TCPDF {
$opt['maxlen'] = intval($prop['charLimit']);
}
if (!isset($ff)) {
- $ff = 0;
+ $ff = 0; // default value
}
// readonly: The read-only characteristic of a field. If a field is read-only, the user can see the field but cannot change it.
if (isset($prop['readonly']) AND ($prop['readonly'] == 'true')) {
@@ -16879,8 +16886,22 @@ class TCPDF {
$this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i'];
$fontstyle = sprintf('/F%d %.2F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor);
$popt['da'] = $fontstyle;
+ // build appearance stream
$popt['ap'] = array();
- $popt['ap']['n'] = 'q BT '.$fontstyle.' ET Q';
+ $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' ';
+ $text = '';
+ if (isset($prop['value']) AND !empty($prop['value'])) {
+ $text = $prop['value'];
+ } elseif (isset($opt['v']) AND !empty($opt['v'])) {
+ $text = $opt['v'];
+ }
+ $tmpid = $this->startTemplate($w, $h, false);
+ $this->MultiCell($w, $h, $text, 0, '', false, 0, 0, 0, true, 0, false, true, 0, 'T', false);
+ $this->endTemplate();
+ --$this->n;
+ $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata'];
+ unset($this->xobjects[$tmpid]);
+ $popt['ap']['n'] .= 'Q EMC';
// merge options
$opt = array_merge($popt, $opt);
// remove some conflicting options
@@ -16889,32 +16910,30 @@ class TCPDF {
$opt['Subtype'] = 'Widget';
$opt['ft'] = 'Tx';
$opt['t'] = $name;
- /*
- Additional annotation's parameters (check _putannotsobj() method):
+ // Additional annotation's parameters (check _putannotsobj() method):
//$opt['f']
- //$opt['ap']
//$opt['as']
//$opt['bs']
//$opt['be']
//$opt['c']
//$opt['border']
//$opt['h']
- //$opt['mk']
+ //$opt['mk'];
//$opt['mk']['r']
- //$opt['mk']['bc']
- //$opt['mk']['bg']
- //$opt['mk']['ca']
- //$opt['mk']['rc']
- //$opt['mk']['ac']
- //$opt['mk']['i']
- //$opt['mk']['ri']
- //$opt['mk']['ix']
- //$opt['mk']['if']
- //$opt['mk']['if']['sw']
- //$opt['mk']['if']['s']
- //$opt['mk']['if']['a']
- //$opt['mk']['if']['fb']
- //$opt['mk']['tp']
+ //$opt['mk']['bc'];
+ //$opt['mk']['bg'];
+ unset($opt['mk']['ca']);
+ unset($opt['mk']['rc']);
+ unset($opt['mk']['ac']);
+ unset($opt['mk']['i']);
+ unset($opt['mk']['ri']);
+ unset($opt['mk']['ix']);
+ unset($opt['mk']['if']);
+ //$opt['mk']['if']['sw'];
+ //$opt['mk']['if']['s'];
+ //$opt['mk']['if']['a'];
+ //$opt['mk']['if']['fb'];
+ unset($opt['mk']['tp']);
//$opt['tu']
//$opt['tm']
//$opt['ff']
@@ -16923,7 +16942,6 @@ class TCPDF {
//$opt['a']
//$opt['aa']
//$opt['q']
- */
$this->Annotation($x, $y, $w, $h, $name, $opt, 0);
if ($this->rtl) {
$this->x -= $w;
@@ -16933,16 +16951,16 @@ class TCPDF {
}
/**
- * Creates a RadioButton field
- * @param $name (string) field name
- * @param $w (int) width
- * @param $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
- * @param $opt (array) annotation parameters. Possible values are described on official PDF32000_2008 reference.
- * @param $onvalue (string) value to be returned if selected.
- * @param $checked (boolean) define the initial state.
+ * Creates a RadioButton field.
+ * @param $name (string) Field name.
+ * @param $w (int) Width or the radio button.
+ * @param $prop (array) Javascript field properties. Possible values are described on official Javascript for Acrobat API reference.
+ * @param $opt (array) Annotation parameters. Possible values are described on official PDF32000_2008 reference.
+ * @param $onvalue (string) Value to be returned if selected.
+ * @param $checked (boolean) Define the initial state.
* @param $x (float) Abscissa of the upper-left corner of the rectangle
* @param $y (float) Ordinate of the upper-left corner of the rectangle
- * @param $js (boolean) if true put the field using JavaScript (requires Acrobat Writer to be rendered).
+ * @param $js (boolean) If true put the field using JavaScript (requires Acrobat Writer to be rendered).
* @public
* @author Nicola Asuni
* @since 4.8.000 (2009-09-07)
@@ -16977,10 +16995,8 @@ class TCPDF {
++$this->n;
$this->radiobutton_groups[$this->page][$name]['n'] = $this->n;
$this->radio_groups[] = $this->n;
- $kid = ($this->n + 2);
- } else {
- $kid = ($this->n + 1);
}
+ $kid = ($this->n + 1);
// save object ID to be added on Kids entry on parent object
$this->radiobutton_groups[$this->page][$name][] = array('kid' => $kid, 'def' => $defval);
// get default style
@@ -16997,10 +17013,12 @@ class TCPDF {
$this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i'];
$fontstyle = sprintf('/F%d %.2F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor);
$popt['da'] = $fontstyle;
+ // build appearance stream
$popt['ap'] = array();
$popt['ap']['n'] = array();
- $popt['ap']['n'][$onvalue] = 'q BT '.$fontstyle.' 0 0 Td (8) Tj ET Q';
- $popt['ap']['n']['Off'] = 'q BT '.$fontstyle.' 0 0 Td (8) Tj ET Q';
+ $fy = (($w - ((($tmpfont['desc']['Ascent'] - $tmpfont['desc']['Descent']) * $this->FontSizePt / 1000) / $this->k)) * $this->k);
+ $popt['ap']['n'][$onvalue] = sprintf('q %s BT /F%d %.2F Tf %.2F %.2F Td ('.chr(108).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, 0, $fy);
+ $popt['ap']['n']['Off'] = sprintf('q %s BT /F%d %.2F Tf %.2F %.2F Td ('.chr(109).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, 0, $fy);
if (!isset($popt['mk'])) {
$popt['mk'] = array();
}
@@ -17057,7 +17075,7 @@ class TCPDF {
$this->_addfield('listbox', $name, $x, $y, $w, $h, $prop);
$s = '';
foreach ($values as $value) {
- $s .= "'".addslashes($value)."',";
+ $s .= '\''.addslashes($value).'\',';
}
$this->javascript .= 'f'.$name.'.setItems(['.substr($s, 0, -1)."]);\n";
return;
@@ -17070,8 +17088,20 @@ class TCPDF {
$this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i'];
$fontstyle = sprintf('/F%d %.2F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor);
$popt['da'] = $fontstyle;
+ // build appearance stream
$popt['ap'] = array();
- $popt['ap']['n'] = 'q BT '.$fontstyle.' ET Q';
+ $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' ';
+ $text = '';
+ foreach($values as $item) {
+ $text .= $item."\n";
+ }
+ $tmpid = $this->startTemplate($w, $h, false);
+ $this->MultiCell($w, $h, $text, 0, '', false, 0, 0, 0, true, 0, false, true, 0, 'T', false);
+ $this->endTemplate();
+ --$this->n;
+ $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata'];
+ unset($this->xobjects[$tmpid]);
+ $popt['ap']['n'] .= 'Q EMC';
// merge options
$opt = array_merge($popt, $opt);
// set remaining annotation data
@@ -17079,6 +17109,14 @@ class TCPDF {
$opt['ft'] = 'Ch';
$opt['t'] = $name;
$opt['opt'] = $values;
+ unset($opt['mk']['ca']);
+ unset($opt['mk']['rc']);
+ unset($opt['mk']['ac']);
+ unset($opt['mk']['i']);
+ unset($opt['mk']['ri']);
+ unset($opt['mk']['ix']);
+ unset($opt['mk']['if']);
+ unset($opt['mk']['tp']);
$this->Annotation($x, $y, $w, $h, $name, $opt, 0);
if ($this->rtl) {
$this->x -= $w;
@@ -17129,8 +17167,20 @@ class TCPDF {
$this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i'];
$fontstyle = sprintf('/F%d %.2F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor);
$popt['da'] = $fontstyle;
+ // build appearance stream
$popt['ap'] = array();
- $popt['ap']['n'] = 'q BT '.$fontstyle.' ET Q';
+ $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' ';
+ $text = '';
+ foreach($values as $item) {
+ $text .= $item[1]."\n";
+ }
+ $tmpid = $this->startTemplate($w, $h, false);
+ $this->MultiCell($w, $h, $text, 0, '', false, 0, 0, 0, true, 0, false, true, 0, 'T', false);
+ $this->endTemplate();
+ --$this->n;
+ $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata'];
+ unset($this->xobjects[$tmpid]);
+ $popt['ap']['n'] .= 'Q EMC';
// merge options
$opt = array_merge($popt, $opt);
// set remaining annotation data
@@ -17138,6 +17188,14 @@ class TCPDF {
$opt['ft'] = 'Ch';
$opt['t'] = $name;
$opt['opt'] = $values;
+ unset($opt['mk']['ca']);
+ unset($opt['mk']['rc']);
+ unset($opt['mk']['ac']);
+ unset($opt['mk']['i']);
+ unset($opt['mk']['ri']);
+ unset($opt['mk']['ix']);
+ unset($opt['mk']['if']);
+ unset($opt['mk']['tp']);
$this->Annotation($x, $y, $w, $h, $name, $opt, 0);
if ($this->rtl) {
$this->x -= $w;
@@ -17189,10 +17247,13 @@ class TCPDF {
$this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i'];
$fontstyle = sprintf('/F%d %.2F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor);
$popt['da'] = $fontstyle;
+ // build appearance stream
$popt['ap'] = array();
$popt['ap']['n'] = array();
- $popt['ap']['n']['Yes'] = 'q BT '.$fontstyle.' 0 0 Td (8) Tj ET Q';
- $popt['ap']['n']['Off'] = 'q BT '.$fontstyle.' 0 0 Td (8) Tj ET Q';
+ $fy = ((($tmpfont['desc']['Ascent'] + $tmpfont['desc']['Descent']) * $this->FontSizePt) / (1000 * $this->k));
+ $fy = (($w - ((($tmpfont['desc']['Ascent'] - $tmpfont['desc']['Descent']) * $this->FontSizePt / 1000) / $this->k)) * $this->k);
+ $popt['ap']['n']['Yes'] = sprintf('q %s BT /F%d %.2F Tf %.2F %.2F Td ('.chr(110).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, 0, $fy);
+ $popt['ap']['n']['Off'] = sprintf('q %s BT /F%d %.2F Tf %.2F %.2F Td ('.chr(111).') Tj ET Q', $this->TextColor, $tmpfont['i'], $this->FontSizePt, 0, $fy);
// merge options
$opt = array_merge($popt, $opt);
// set remaining annotation data
@@ -17258,8 +17319,23 @@ class TCPDF {
$this->annotation_fonts[$this->CurrentFont['fontkey']] = $this->CurrentFont['i'];
$fontstyle = sprintf('/F%d %.2F Tf %s', $this->CurrentFont['i'], $this->FontSizePt, $this->TextColor);
$popt['da'] = $fontstyle;
+ // build appearance stream
$popt['ap'] = array();
- $popt['ap']['n'] = 'q BT '.$fontstyle.' ET Q';
+ $popt['ap']['n'] = '/Tx BMC q '.$fontstyle.' ';
+ $tmpid = $this->startTemplate($w, $h, false);
+ $bw = (2 / $this->k); // border width
+ $border = array(
+ 'L' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(231)),
+ 'R' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(51)),
+ 'T' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(231)),
+ 'B' => array('width' => $bw, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(51)));
+ $this->SetFillColor(204);
+ $this->Cell($w, $h, $caption, $border, 0, 'C', true, '', 1, false, 'T', 'M');
+ $this->endTemplate();
+ --$this->n;
+ $popt['ap']['n'] .= $this->xobjects[$tmpid]['outdata'];
+ unset($this->xobjects[$tmpid]);
+ $popt['ap']['n'] .= 'Q EMC';
// set additional default options
if (!isset($popt['mk'])) {
$popt['mk'] = array();