32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-12-22 08:28:54 +00:00

6.2.12 (2015-09-12)

- fix composer package name to tecnickcom/tcpdf
This commit is contained in:
nicolaasuni 2015-09-12 11:08:34 +01:00
parent 354433a339
commit 2f732eaa91
6 changed files with 859 additions and 759 deletions

View File

@ -1,3 +1,6 @@
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.

View File

@ -9,8 +9,8 @@ or via PayPal at paypal@tecnick.com
------------------------------------------------------------
Name: TCPDF
Version: 6.2.11
Release date: 2015-08-02
Version: 6.2.12
Release date: 2015-09-12
Author: Nicola Asuni
Copyright (c) 2002-2015:

View File

@ -1,6 +1,6 @@
{
"name": "tecnick.com/tcpdf",
"version": "6.2.11",
"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.",

View File

@ -154,7 +154,7 @@ class TCPDF_FONTS {
$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.' ';
}
@ -1490,6 +1490,171 @@ class TCPDF_FONTS {
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
@ -1663,64 +1828,6 @@ class TCPDF_FONTS {
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
@ -2535,55 +2642,6 @@ class TCPDF_FONTS {
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
//============================================================+

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 6.2.11
// Version : 6.2.12
// Begin : 2002-08-03
// Last Update : 2015-06-18
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com