Skip to content

Commit

Permalink
MDL-51534 libraries: Update TCPDF library to 6.2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Oct 5, 2015
1 parent 35d3e8b commit 1340ed8
Show file tree
Hide file tree
Showing 71 changed files with 1,148 additions and 970 deletions.
21 changes: 21 additions & 0 deletions lib/tcpdf/CHANGELOG.TXT
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
6.2.12 (2015-09-12)
- fix composer package name to tecnickcom/tcpdf

6.2.11 (2015-08-02)
- Bug #1070 "PNG regression in 6.2.9 (they appear as their alpha channel)" was fixed.
- Bug #1069 "Encoded SRC URLs in <img> tags don't work anymore" was fixed.

6.2.10 (2015-07-28)
- Minor mod to PNG parsing.
- Make dependency on mcrypt optional.

6.2.8 (2015-04-29)
- Removed unwanted file.

6.2.7 (2015-04-28)
- Merged PR 17: Avoid warning when iterating a non-array variable.
- Merged PR 16: Improve MuliCell param definition.
- Improved column check (PR 15).
- Merged PR 11: Use stream_is_local instead of limit to file://.
- Merged PR 10: ImageMagick link on README.txt.

6.2.6 (2015-01-28)
- Bug #1008 "UTC offset sing breaks PDF/A-1b compliance" was fixed.

Expand Down
Empty file modified lib/tcpdf/LICENSE.TXT
100644 → 100755
Empty file.
8 changes: 5 additions & 3 deletions lib/tcpdf/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ TCPDF - README
I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT.
PLEASE MAKE A DONATION:
http://sourceforge.net/donate/index.php?group_id=128076
or via PayPal at [email protected]

------------------------------------------------------------

Name: TCPDF
Version: 6.2.6
Release date: 2015-01-28
Version: 6.2.12
Release date: 2015-09-12
Author: Nicola Asuni

Copyright (c) 2002-2015:
Expand All @@ -20,6 +21,7 @@ Copyright (c) 2002-2015:
URLs:
http://www.tcpdf.org
http://www.sourceforge.net/projects/tcpdf
https://github.com/tecnickcom/TCPDF

Description:
TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions.
Expand All @@ -34,7 +36,7 @@ Main Features:
* font subsetting;
* methods to publish some XHTML + CSS code, Javascript and Forms;
* images, graphic (geometric figures) and transformation methods;
* supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http: www.imagemagick.org/www/formats.html)
* supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/script/formats.php)
* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
* JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
* automatic page header and footer management;
Expand Down
4 changes: 2 additions & 2 deletions lib/tcpdf/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tecnick.com/tcpdf",
"version": "6.2.6",
"name": "tecnickcom/tcpdf",
"version": "6.2.12",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
Expand Down
Empty file modified lib/tcpdf/config/tcpdf_config.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/courier.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/courierb.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/courierbi.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/courieri.php
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions lib/tcpdf/fonts/freefont-20120503/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4232,7 +4232,7 @@
so the commonly used ones were shorter. pba_mal renamed to ba_mal
chandrakkala renamed to candrakala Cleared NameMe_195551 as it
did nothing Raised ascenders on both i_sign_mal and ii_sign_mal,
and made the latter go over preceeding letter, based on other
and made the latter go over preceding letter, based on other
fonts and samples.

2010-10-07 06:21 +0000 [r1580] Stevan_White:
Expand Down Expand Up @@ -8330,7 +8330,7 @@
FreeSerifBold.sfd: Various technical tweeks,
mostly concerning recent additions. Also did a bit more "Points
too close" and "irrelevant control points". Cyrillic millions
redesign meant could not maintain use of refrences for it.
redesign meant could not maintain use of references for it.

2008-10-03 11:03 +0000 [r962] Stevan_White:

Expand Down
Empty file modified lib/tcpdf/fonts/freemono.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freemono.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freemono.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freemonob.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freemonob.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freemonob.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freemonobi.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freemonobi.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freemonobi.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freemonoi.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freemonoi.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freemonoi.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freesans.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freesans.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freesans.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freesansb.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freesansb.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freesansb.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freesansbi.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freesansbi.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freesansbi.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freesansi.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freesansi.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freesansi.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freeserif.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freeserif.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freeserif.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freeserifb.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freeserifb.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freeserifb.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freeserifbi.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freeserifbi.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freeserifbi.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/freeserifi.ctg.z
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/tcpdf/fonts/freeserifi.php
100644 → 100755

Large diffs are not rendered by default.

Empty file modified lib/tcpdf/fonts/freeserifi.z
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/helvetica.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/helveticab.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/helveticabi.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/helveticai.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/hysmyeongjostdmedium.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/kozgopromedium.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/kozminproregular.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/msungstdlight.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/stsongstdlight.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/symbol.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/times.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/timesb.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/timesbi.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/timesi.php
100644 → 100755
Empty file.
Empty file modified lib/tcpdf/fonts/zapfdingbats.php
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions lib/tcpdf/include/barcodes/qrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ protected function encodeString($string) {
protected function encodeMask($mask) {
$spec = array(0, 0, 0, 0, 0);
$this->datacode = $this->getByteStream($this->items);

if (is_null($this->datacode)) {
return NULL;
}
Expand Down
Binary file modified lib/tcpdf/include/sRGB.icc
Binary file not shown.
274 changes: 166 additions & 108 deletions lib/tcpdf/include/tcpdf_fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static function addTTFfont($fontfile, $fonttype='', $enc='', $flags=32, $
$enc_target = TCPDF_FONT_DATA::$encmap[$enc];
$last = 0;
for ($i = 32; $i <= 255; ++$i) {
if ($enc_target != $enc_ref[$i]) {
if ($enc_target[$i] != $enc_ref[$i]) {
if ($i != ($last + 1)) {
$fmetric['diff'] .= $i.' ';
}
Expand Down Expand Up @@ -1490,6 +1490,171 @@ public static function _putfontwidths($font, $cidoffset=0) {
return '/W ['.$w.' ]';
}




/**
* Update the CIDToGIDMap string with a new value.
* @param $map (string) CIDToGIDMap.
* @param $cid (int) CID value.
* @param $gid (int) GID value.
* @return (string) CIDToGIDMap.
* @author Nicola Asuni
* @since 5.9.123 (2011-09-29)
* @public static
*/
public static function updateCIDtoGIDmap($map, $cid, $gid) {
if (($cid >= 0) AND ($cid <= 0xFFFF) AND ($gid >= 0)) {
if ($gid > 0xFFFF) {
$gid -= 0x10000;
}
$map[($cid * 2)] = chr($gid >> 8);
$map[(($cid * 2) + 1)] = chr($gid & 0xFF);
}
return $map;
}

/**
* Return fonts path
* @return string
* @public static
*/
public static function _getfontpath() {
if (!defined('K_PATH_FONTS') AND is_dir($fdir = realpath(dirname(__FILE__).'/../fonts'))) {
if (substr($fdir, -1) != '/') {
$fdir .= '/';
}
define('K_PATH_FONTS', $fdir);
}
return defined('K_PATH_FONTS') ? K_PATH_FONTS : '';
}



/**
* Return font full path
* @param $file (string) Font file name.
* @param $fontdir (string) Font directory (set to false fto search on default directories)
* @return string Font full path or empty string
* @author Nicola Asuni
* @since 6.0.025
* @public static
*/
public static function getFontFullPath($file, $fontdir=false) {
$fontfile = '';
// search files on various directories
if (($fontdir !== false) AND @file_exists($fontdir.$file)) {
$fontfile = $fontdir.$file;
} elseif (@file_exists(self::_getfontpath().$file)) {
$fontfile = self::_getfontpath().$file;
} elseif (@file_exists($file)) {
$fontfile = $file;
}
return $fontfile;
}




/**
* Get a reference font size.
* @param $size (string) String containing font size value.
* @param $refsize (float) Reference font size in points.
* @return float value in points
* @public static
*/
public static function getFontRefSize($size, $refsize=12) {
switch ($size) {
case 'xx-small': {
$size = ($refsize - 4);
break;
}
case 'x-small': {
$size = ($refsize - 3);
break;
}
case 'small': {
$size = ($refsize - 2);
break;
}
case 'medium': {
$size = $refsize;
break;
}
case 'large': {
$size = ($refsize + 2);
break;
}
case 'x-large': {
$size = ($refsize + 4);
break;
}
case 'xx-large': {
$size = ($refsize + 6);
break;
}
case 'smaller': {
$size = ($refsize - 3);
break;
}
case 'larger': {
$size = ($refsize + 3);
break;
}
}
return $size;
}








































// ====================================================================================================================
// REIMPLEMENTED
// ====================================================================================================================








/**
* Returns the unicode caracter specified by the value
* @param $c (int) UTF-8 value
Expand Down Expand Up @@ -1663,64 +1828,6 @@ public static function UniArrSubString($uniarr, $start='', $end='') {
return $string;
}

/**
* Update the CIDToGIDMap string with a new value.
* @param $map (string) CIDToGIDMap.
* @param $cid (int) CID value.
* @param $gid (int) GID value.
* @return (string) CIDToGIDMap.
* @author Nicola Asuni
* @since 5.9.123 (2011-09-29)
* @public static
*/
public static function updateCIDtoGIDmap($map, $cid, $gid) {
if (($cid >= 0) AND ($cid <= 0xFFFF) AND ($gid >= 0)) {
if ($gid > 0xFFFF) {
$gid -= 0x10000;
}
$map[($cid * 2)] = chr($gid >> 8);
$map[(($cid * 2) + 1)] = chr($gid & 0xFF);
}
return $map;
}

/**
* Return fonts path
* @return string
* @public static
*/
public static function _getfontpath() {
if (!defined('K_PATH_FONTS') AND is_dir($fdir = realpath(dirname(__FILE__).'/../fonts'))) {
if (substr($fdir, -1) != '/') {
$fdir .= '/';
}
define('K_PATH_FONTS', $fdir);
}
return defined('K_PATH_FONTS') ? K_PATH_FONTS : '';
}

/**
* Return font full path
* @param $file (string) Font file name.
* @param $fontdir (string) Font directory (set to false fto search on default directories)
* @return string Font full path or empty string
* @author Nicola Asuni
* @since 6.0.025
* @public static
*/
public static function getFontFullPath($file, $fontdir=false) {
$fontfile = '';
// search files on various directories
if (($fontdir !== false) AND @file_exists($fontdir.$file)) {
$fontfile = $fontdir.$file;
} elseif (@file_exists(self::_getfontpath().$file)) {
$fontfile = self::_getfontpath().$file;
} elseif (@file_exists($file)) {
$fontfile = $file;
}
return $fontfile;
}

/**
* Converts UTF-8 characters array to array of Latin1 characters array<br>
* @param $unicode (array) array containing UTF-8 unicode values
Expand Down Expand Up @@ -2535,55 +2642,6 @@ public static function utf8Bidi($ta, $str='', $forcertl=false, $isunicode=true,
return $ordarray;
}

/**
* Get a reference font size.
* @param $size (string) String containing font size value.
* @param $refsize (float) Reference font size in points.
* @return float value in points
* @public static
*/
public static function getFontRefSize($size, $refsize=12) {
switch ($size) {
case 'xx-small': {
$size = ($refsize - 4);
break;
}
case 'x-small': {
$size = ($refsize - 3);
break;
}
case 'small': {
$size = ($refsize - 2);
break;
}
case 'medium': {
$size = $refsize;
break;
}
case 'large': {
$size = ($refsize + 2);
break;
}
case 'x-large': {
$size = ($refsize + 4);
break;
}
case 'xx-large': {
$size = ($refsize + 6);
break;
}
case 'smaller': {
$size = ($refsize - 3);
break;
}
case 'larger': {
$size = ($refsize + 3);
break;
}
}
return $size;
}

} // END OF TCPDF_FONTS CLASS

//============================================================+
Expand Down
Loading

0 comments on commit 1340ed8

Please sign in to comment.