30
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-09-20 16:49:01 +00:00

6.0.098 (2014-11-08)

- Bug item #996 "getCharBBox() returns incorrect results for TTF glyphs without outlines" was fixed.
- Bug item #991 "Text problem with SVG" was fixed (only the font style part).
This commit is contained in:
nicolaasuni 2014-11-08 11:12:39 +00:00
parent 00f7613b21
commit de89c0d7fd
45 changed files with 86 additions and 56 deletions

View File

@ -1,3 +1,7 @@
6.0.098 (2014-11-08)
- Bug item #996 "getCharBBox($char) returns incorrect results for TTF glyphs without outlines" was fixed.
- Bug item #991 "Text problem with SVG" was fixed (only the font style part).
6.0.097 (2014-10-20)
- Bug item #988 "hyphenateText - charmin parameter not work" was fixed.
- New 1D barcode method to print pre-formatted IMB - Intelligent Mail Barcode - Onecode - USPS-B-3200.

View File

@ -8,8 +8,8 @@ http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------
Name: TCPDF
Version: 6.0.097
Release date: 2014-10-20
Version: 6.0.098
Release date: 2014-11-08
Author: Nicola Asuni
Copyright (c) 2002-2014:

View File

@ -1,6 +1,6 @@
{
"name": "tecnick.com/tcpdf",
"version": "6.0.097",
"version": "6.0.098",
"homepage": "http://www.tcpdf.org/",
"type": "library",
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf_fonts.php
// Version : 1.0.013
// Version : 1.0.014
// Begin : 2008-01-01
// Last Update : 2014-05-23
// Last Update : 2014-11-08
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
@ -42,7 +42,7 @@
* @class TCPDF_FONTS
* Font methods for TCPDF library.
* @package com.tecnick.tcpdf
* @version 1.0.013
* @version 1.0.014
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF_FONTS {
@ -435,6 +435,10 @@ class TCPDF_FONTS {
$tot_num_glyphs = floor($table['loca']['length'] / 2); // numGlyphs + 1
for ($i = 0; $i < $tot_num_glyphs; ++$i) {
$indexToLoc[$i] = TCPDF_STATIC::_getUSHORT($font, $offset) * 2;
if (isset($indexToLoc[($i - 1)]) && ($indexToLoc[$i] == $indexToLoc[($i - 1)])) {
// the last glyph didn't have an outline
unset($indexToLoc[($i - 1)]);
}
$offset += 2;
}
} else {
@ -442,6 +446,10 @@ class TCPDF_FONTS {
$tot_num_glyphs = floor($table['loca']['length'] / 4); // numGlyphs + 1
for ($i = 0; $i < $tot_num_glyphs; ++$i) {
$indexToLoc[$i] = TCPDF_STATIC::_getULONG($font, $offset);
if (isset($indexToLoc[($i - 1)]) && ($indexToLoc[$i] == $indexToLoc[($i - 1)])) {
// the last glyph didn't have an outline
unset($indexToLoc[($i - 1)]);
}
$offset += 4;
}
}

View File

@ -55,7 +55,7 @@ class TCPDF_STATIC {
* Current TCPDF version.
* @private static
*/
private static $tcpdf_version = '6.0.097';
private static $tcpdf_version = '6.0.098';
/**
* String alias for total number of pages.

View File

@ -1,9 +1,9 @@
<?php
//============================================================+
// File name : tcpdf.php
// Version : 6.0.097
// Version : 6.0.098
// Begin : 2002-08-03
// Last Update : 2014-10-20
// Last Update : 2014-11-08
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// -------------------------------------------------------------------
@ -104,7 +104,7 @@
* Tools to encode your unicode fonts are on fonts/utils directory.</p>
* @package com.tecnick.tcpdf
* @author Nicola Asuni
* @version 6.0.097
* @version 6.0.098
*/
// TCPDF configuration
@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.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.<br>
* @package com.tecnick.tcpdf
* @brief PHP class for generating PDF documents without requiring external extensions.
* @version 6.0.097
* @version 6.0.098
* @author Nicola Asuni - info@tecnick.com
*/
class TCPDF {
@ -4580,8 +4580,14 @@ class TCPDF {
* @since 5.9.186 (2012-09-13)
*/
public function getCharBBox($char) {
if (isset($this->CurrentFont['cbbox'][$char])) {
return array_map(array($this,'getAbsFontMeasure'), $this->CurrentFont['cbbox'][intval($char)]);
$c = intval($char);
if (isset($this->CurrentFont['cw'][$c])) {
// glyph is defined ... use zero width & height for glyphs without outlines
$result = array(0,0,0,0);
if (isset($this->CurrentFont['cbbox'][$c])) {
$result = $this->CurrentFont['cbbox'][$c];
}
return array_map(array($this,'getAbsFontMeasure'), $result);
}
return false;
}
@ -23487,6 +23493,14 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$font_style .= 'B';
break;
}
case 'normal': {
if ((substr($font_family, -1) == 'I') AND (substr($font_family, -2, 1) == 'B')) {
$font_family = substr($font_family, 0, -2).'I';
} elseif (substr($font_family, -1) == 'B') {
$font_family = substr($font_family, 0, -1);
}
break;
}
}
switch ($svgstyle['text-decoration']) {
case 'underline': {
@ -24344,6 +24358,9 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
// text
case 'text':
case 'tspan': {
if (isset($this->svgtextmode['text-anchor']) AND !empty($this->svgtext)) {
// @TODO: unsupported feature
}
// only basic support - advanced features must be implemented
$this->svgtextmode['invisible'] = $invisible;
if ($invisible) {
@ -24529,6 +24546,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
$tmpx = $this->x;
$tmpy = $this->y;
}
// print the text
$this->Cell($textlen, 0, $text, 0, 0, '', false, '', 0, false, 'L', 'T');
if ($name == 'text') {
// restore coordinates