From e55ac3e4a2fb900acac5106791632c3845a10a2a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 25 Jun 2018 16:01:06 +0200 Subject: [PATCH] Update dompdf deps --- library/vendor/dompdf/SOURCE | 12 +- .../php-font-lib/src/FontLib/BinaryStream.php | 49 ++++++- .../Exception/FontNotFoundException.php | 11 ++ .../lib/php-font-lib/src/FontLib/Font.php | 6 + .../src/FontLib/Glyph/Outline.php | 8 +- .../src/FontLib/Glyph/OutlineComposite.php | 17 ++- .../src/FontLib/Table/Type/cmap.php | 122 ++++++++++++------ .../src/FontLib/Table/Type/glyf.php | 2 +- .../src/FontLib/Table/Type/hmtx.php | 9 +- .../src/FontLib/Table/Type/kern.php | 13 +- .../src/FontLib/Table/Type/loca.php | 4 +- .../src/FontLib/Table/Type/name.php | 4 +- .../src/FontLib/Table/Type/post.php | 5 +- .../src/FontLib/TrueType/File.php | 2 +- .../lib/php-svg-lib/src/Svg/DefaultStyle.php | 2 +- .../lib/php-svg-lib/src/Svg/Document.php | 11 +- .../lib/php-svg-lib/src/Svg/Gradient/Stop.php | 2 +- .../dompdf/lib/php-svg-lib/src/Svg/Style.php | 2 +- .../src/Svg/Surface/SurfaceCpdf.php | 2 +- .../src/Svg/Surface/SurfaceGmagick.php | 2 +- .../src/Svg/Surface/SurfaceInterface.php | 2 +- .../src/Svg/Surface/SurfacePDFLib.php | 2 +- .../php-svg-lib/src/Svg/Tag/AbstractTag.php | 6 +- .../lib/php-svg-lib/src/Svg/Tag/Anchor.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Circle.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/ClipPath.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Ellipse.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Group.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Image.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Line.php | 2 +- .../src/Svg/Tag/LinearGradient.php | 8 +- .../lib/php-svg-lib/src/Svg/Tag/Path.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Polygon.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Polyline.php | 2 +- .../src/Svg/Tag/RadialGradient.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Rect.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Shape.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Stop.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/StyleTag.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/Text.php | 2 +- .../lib/php-svg-lib/src/Svg/Tag/UseTag.php | 2 +- .../dompdf/lib/php-svg-lib/src/autoload.php | 2 +- 42 files changed, 226 insertions(+), 113 deletions(-) create mode 100644 library/vendor/dompdf/lib/php-font-lib/src/FontLib/Exception/FontNotFoundException.php diff --git a/library/vendor/dompdf/SOURCE b/library/vendor/dompdf/SOURCE index d6e5b5c11..d39191933 100644 --- a/library/vendor/dompdf/SOURCE +++ b/library/vendor/dompdf/SOURCE @@ -5,12 +5,12 @@ tar xzf dompdf-0.8.2.tar.gz --strip-components 1 dompdf-0.8.2/{lib,src,LICENSE.L rm dompdf-0.8.2.tar.gz mv LICENSE.LGPL LICENSE -curl https://codeload.github.com/PhenX/php-font-lib/tar.gz/0.4 -o php-font-lib-0.4.tar.gz +curl https://codeload.github.com/PhenX/php-font-lib/tar.gz/0.5.1 -o php-font-lib-0.5.1.tar.gz mkdir -p lib/php-font-lib -tar xzf php-font-lib-0.4.tar.gz --strip-components 1 -C lib/php-font-lib php-font-lib-0.4/{src,LICENSE} -rm php-font-lib-0.4.tar.gz +tar xzf php-font-lib-0.5.1.tar.gz --strip-components 1 -C lib/php-font-lib php-font-lib-0.5.1/{src,LICENSE} +rm php-font-lib-0.5.1.tar.gz -curl https://codeload.github.com/PhenX/php-svg-lib/tar.gz/v0.3 -o php-svg-lib-0.3.tar.gz +curl https://codeload.github.com/PhenX/php-svg-lib/tar.gz/v0.3.2 -o php-svg-lib-0.3.2.tar.gz mkdir -p lib/php-svg-lib -tar xzf php-svg-lib-0.3.tar.gz --strip-components 1 -C lib/php-svg-lib php-svg-lib-0.3/src -rm php-svg-lib-0.3.tar.gz +tar xzf php-svg-lib-0.3.2.tar.gz --strip-components 1 -C lib/php-svg-lib php-svg-lib-0.3.2/src +rm php-svg-lib-0.3.2.tar.gz diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/BinaryStream.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/BinaryStream.php index 6c743f3d2..ab1045446 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/BinaryStream.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/BinaryStream.php @@ -157,6 +157,10 @@ class BinaryStream { return ord($this->read(1)); } + public function readUInt8Many($count) { + return array_values(unpack("C*", $this->read($count))); + } + public function writeUInt8($data) { return $this->write(chr($data), 1); } @@ -171,6 +175,10 @@ class BinaryStream { return $v; } + public function readInt8Many($count) { + return array_values(unpack("c*", $this->read($count))); + } + public function writeInt8($data) { if ($data < 0) { $data += 0x100; @@ -185,6 +193,10 @@ class BinaryStream { return $a["n"]; } + public function readUInt16Many($count) { + return array_values(unpack("n*", $this->read($count * 2))); + } + public function readUFWord() { return $this->readUInt16(); } @@ -198,7 +210,8 @@ class BinaryStream { } public function readInt16() { - $v = $this->readUInt16(); + $a = unpack("nn", $this->read(2)); + $v = $a["n"]; if ($v >= 0x8000) { $v -= 0x10000; @@ -207,6 +220,17 @@ class BinaryStream { return $v; } + public function readInt16Many($count) { + $vals = array_values(unpack("n*", $this->read($count * 2))); + foreach ($vals as &$v) { + if ($v >= 0x8000) { + $v -= 0x10000; + } + } + + return $vals; + } + public function readFWord() { return $this->readInt16(); } @@ -250,6 +274,13 @@ class BinaryStream { public function readLongDateTime() { $this->readUInt32(); // ignored $date = $this->readUInt32() - 2082844800; + + # PHP_INT_MIN isn't defined in PHP < 7.0 + $php_int_min = defined("PHP_INT_MIN") ? PHP_INT_MIN : ~PHP_INT_MAX; + + if (is_string($date) || $date > PHP_INT_MAX || $date < $php_int_min) { + $date = 0; + } return strftime("%Y-%m-%d %H:%M:%S", $date); } @@ -319,6 +350,18 @@ class BinaryStream { if ($type[0] == self::char) { return $this->read($type[1]); } + if ($type[0] == self::uint16) { + return $this->readUInt16Many($type[1]); + } + if ($type[0] == self::int16) { + return $this->readInt16Many($type[1]); + } + if ($type[0] == self::uint8) { + return $this->readUInt8Many($type[1]); + } + if ($type[0] == self::int8) { + return $this->readInt8Many($type[1]); + } $ret = array(); for ($i = 0; $i < $type[1]; $i++) { @@ -376,7 +419,9 @@ class BinaryStream { $ret = 0; for ($i = 0; $i < $type[1]; $i++) { - $ret += $this->w($type[0], $data[$i]); + if (isset($data[$i])) { + $ret += $this->w($type[0], $data[$i]); + } } return $ret; diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Exception/FontNotFoundException.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Exception/FontNotFoundException.php new file mode 100644 index 000000000..d97f25236 --- /dev/null +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Exception/FontNotFoundException.php @@ -0,0 +1,11 @@ +message = 'Font not found in: ' . $fontPath; + } +} \ No newline at end of file diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Font.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Font.php index 6ad94d3f4..ecc216e81 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Font.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Font.php @@ -8,6 +8,8 @@ namespace FontLib; +use FontLib\Exception\FontNotFoundException; + /** * Generic font file. * @@ -22,6 +24,10 @@ class Font { * @return TrueType\File|null $file */ public static function load($file) { + if(!file_exists($file)){ + throw new FontNotFoundException($file); + } + $header = file_get_contents($file, false, null, null, 4); $class = null; diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Glyph/Outline.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Glyph/Outline.php index 12091a9f8..330db0918 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Glyph/Outline.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Glyph/Outline.php @@ -42,8 +42,7 @@ class Outline extends BinaryStream { * * @return Outline */ - static function init(glyf $table, $offset, $size) { - $font = $table->getFont(); + static function init(glyf $table, $offset, $size, BinaryStream $font) { $font->seek($offset); if ($font->readInt16() > -1) { @@ -55,7 +54,7 @@ class Outline extends BinaryStream { $glyph = new OutlineComposite($table, $offset, $size); } - $glyph->parse(); + $glyph->parse($font); return $glyph; } @@ -73,8 +72,7 @@ class Outline extends BinaryStream { $this->size = $size; } - function parse() { - $font = $this->getFont(); + function parse(BinaryStream $font) { $font->seek($this->offset); if (!$this->size) { diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Glyph/OutlineComposite.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Glyph/OutlineComposite.php index c77f0399b..8ab0d2c66 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Glyph/OutlineComposite.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Glyph/OutlineComposite.php @@ -41,7 +41,10 @@ class OutlineComposite extends Outline { $glyphIDs[] = $_component->glyphIndex; $_glyph = $this->table->data[$_component->glyphIndex]; - $glyphIDs = array_merge($glyphIDs, $_glyph->getGlyphIDs()); + + if ($_glyph !== $this) { + $glyphIDs = array_merge($glyphIDs, $_glyph->getGlyphIDs()); + } } return $glyphIDs; @@ -224,10 +227,14 @@ class OutlineComposite extends Outline { $glyphs = $glyph_data->data; foreach ($this->components as $component) { - $contours[] = array( - "contours" => $glyphs[$component->glyphIndex]->getSVGContours(), - "transform" => $component->getMatrix(), - ); + $_glyph = $glyphs[$component->glyphIndex]; + + if ($_glyph !== $this) { + $contours[] = array( + "contours" => $_glyph->getSVGContours(), + "transform" => $component->getMatrix(), + ); + } } return $contours; diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/cmap.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/cmap.php index 51d878ba0..7db77e1ae 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/cmap.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/cmap.php @@ -35,6 +35,12 @@ class cmap extends Table { "rangeShift" => self::uint16, ); + private static $subtable_v12_format = array( + "length" => self::uint32, + "language" => self::uint32, + "ngroups" => self::uint32 + ); + protected function _parse() { $font = $this->getFont(); @@ -46,6 +52,7 @@ class cmap extends Table { for ($i = 0; $i < $data["numberSubtables"]; $i++) { $subtables[] = $font->unpack(self::$subtable_header_format); } + $data["subtables"] = $subtables; foreach ($data["subtables"] as $i => &$subtable) { @@ -53,67 +60,100 @@ class cmap extends Table { $subtable["format"] = $font->readUInt16(); - // @todo Only CMAP version 4 - if ($subtable["format"] != 4) { + // @todo Only CMAP version 4 and 12 + if (($subtable["format"] != 4) && ($subtable["format"] != 12)) { unset($data["subtables"][$i]); $data["numberSubtables"]--; continue; } - $subtable += $font->unpack(self::$subtable_v4_format); - $segCount = $subtable["segCountX2"] / 2; - $subtable["segCount"] = $segCount; + if ($subtable["format"] == 12) { - $endCode = $font->r(array(self::uint16, $segCount)); + $font->readUInt16(); - $font->readUInt16(); // reservedPad + $subtable += $font->unpack(self::$subtable_v12_format); - $startCode = $font->r(array(self::uint16, $segCount)); - $idDelta = $font->r(array(self::int16, $segCount)); + $glyphIndexArray = array(); + $endCodes = array(); + $startCodes = array(); - $ro_start = $font->pos(); - $idRangeOffset = $font->r(array(self::uint16, $segCount)); + for ($p = 0; $p < $subtable['ngroups']; $p++) { - $glyphIndexArray = array(); - for ($i = 0; $i < $segCount; $i++) { - $c1 = $startCode[$i]; - $c2 = $endCode[$i]; - $d = $idDelta[$i]; - $ro = $idRangeOffset[$i]; + $startCode = $startCodes[] = $font->readUInt32(); + $endCode = $endCodes[] = $font->readUInt32(); + $startGlyphCode = $font->readUInt32(); - if ($ro > 0) { - $font->seek($subtable["offset"] + 2 * $i + $ro); + for ($c = $startCode; $c <= $endCode; $c++) { + $glyphIndexArray[$c] = $startGlyphCode; + $startGlyphCode++; + } } - for ($c = $c1; $c <= $c2; $c++) { - if ($ro == 0) { - $gid = ($c + $d) & 0xFFFF; + $subtable += array( + "startCode" => $startCodes, + "endCode" => $endCodes, + "glyphIndexArray" => $glyphIndexArray, + ); + + } + else if ($subtable["format"] == 4) { + + $subtable += $font->unpack(self::$subtable_v4_format); + + $segCount = $subtable["segCountX2"] / 2; + $subtable["segCount"] = $segCount; + + $endCode = $font->readUInt16Many($segCount); + + $font->readUInt16(); // reservedPad + + $startCode = $font->readUInt16Many($segCount); + $idDelta = $font->readInt16Many($segCount); + + $ro_start = $font->pos(); + $idRangeOffset = $font->readUInt16Many($segCount); + + $glyphIndexArray = array(); + for ($i = 0; $i < $segCount; $i++) { + $c1 = $startCode[$i]; + $c2 = $endCode[$i]; + $d = $idDelta[$i]; + $ro = $idRangeOffset[$i]; + + if ($ro > 0) { + $font->seek($subtable["offset"] + 2 * $i + $ro); } - else { - $offset = ($c - $c1) * 2 + $ro; - $offset = $ro_start + 2 * $i + $offset; - $font->seek($offset); - $gid = $font->readUInt16(); + for ($c = $c1; $c <= $c2; $c++) { + if ($ro == 0) { + $gid = ($c + $d) & 0xFFFF; + } + else { + $offset = ($c - $c1) * 2 + $ro; + $offset = $ro_start + 2 * $i + $offset; - if ($gid != 0) { - $gid = ($gid + $d) & 0xFFFF; + $font->seek($offset); + $gid = $font->readUInt16(); + + if ($gid != 0) { + $gid = ($gid + $d) & 0xFFFF; + } + } + + if ($gid > 0) { + $glyphIndexArray[$c] = $gid; } } - - if ($gid > 0) { - $glyphIndexArray[$c] = $gid; - } } - } - $subtable += array( - "endCode" => $endCode, - "startCode" => $startCode, - "idDelta" => $idDelta, - "idRangeOffset" => $idRangeOffset, - "glyphIndexArray" => $glyphIndexArray, - ); + $subtable += array( + "endCode" => $endCode, + "startCode" => $startCode, + "idDelta" => $idDelta, + "idRangeOffset" => $idRangeOffset, + "glyphIndexArray" => $glyphIndexArray, + ); + } } $this->data = $data; diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/glyf.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/glyf.php index cbc04d2c8..1fbec3fd5 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/glyf.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/glyf.php @@ -31,7 +31,7 @@ class glyf extends Table { foreach ($real_loca as $gid => $location) { $_offset = $offset + $loca[$gid]; $_size = $loca[$gid + 1] - $loca[$gid]; - $data[$gid] = Outline::init($this, $_offset, $_size); + $data[$gid] = Outline::init($this, $_offset, $_size, $font); } $this->data = $data; diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/hmtx.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/hmtx.php index 4201e1807..76e3307e8 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/hmtx.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/hmtx.php @@ -25,9 +25,12 @@ class hmtx extends Table { $font->seek($offset); $data = array(); - for ($gid = 0; $gid < $numOfLongHorMetrics; $gid++) { - $advanceWidth = $font->readUInt16(); - $leftSideBearing = $font->readUInt16(); + $metrics = $font->readUInt16Many($numOfLongHorMetrics * 2); + for ($gid = 0, $mid = 0; $gid < $numOfLongHorMetrics; $gid++) { + $advanceWidth = isset($metrics[$mid]) ? $metrics[$mid] : 0; + $mid += 1; + $leftSideBearing = isset($metrics[$mid]) ? $metrics[$mid] : 0; + $mid += 1; $data[$gid] = array($advanceWidth, $leftSideBearing); } diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/kern.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/kern.php index 05a17e318..987594647 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/kern.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/kern.php @@ -44,10 +44,15 @@ class kern extends Table { $pairs = array(); $tree = array(); - for ($i = 0; $i < $subtable["nPairs"]; $i++) { - $left = $font->readUInt16(); - $right = $font->readUInt16(); - $value = $font->readInt16(); + $values = $font->readUInt16Many($subtable["nPairs"] * 3); + for ($i = 0, $idx = 0; $i < $subtable["nPairs"]; $i++) { + $left = $values[$idx++]; + $right = $values[$idx++]; + $value = $values[$idx++]; + + if ($value >= 0x8000) { + $value -= 0x10000; + } $pairs[] = array( "left" => $left, diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/loca.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/loca.php index f6397c31e..cbc2a2004 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/loca.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/loca.php @@ -32,7 +32,7 @@ class loca extends Table { $loc = unpack("n*", $d); for ($i = 0; $i <= $numGlyphs; $i++) { - $data[] = $loc[$i + 1] * 2; + $data[] = isset($loc[$i + 1]) ? $loc[$i + 1] * 2 : 0; } } @@ -43,7 +43,7 @@ class loca extends Table { $loc = unpack("N*", $d); for ($i = 0; $i <= $numGlyphs; $i++) { - $data[] = $loc[$i + 1]; + $data[] = isset($loc[$i + 1]) ? $loc[$i + 1] : 0; } } } diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/name.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/name.php index 05e4734cb..794824d3a 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/name.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/name.php @@ -73,7 +73,7 @@ class name extends Table { 3 => "Microsoft", ); - static $plaformSpecific = array( + static $platformSpecific = array( // Unicode 0 => array( 0 => "Default semantics", @@ -190,4 +190,4 @@ class name extends Table { return $length; } -} \ No newline at end of file +} diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/post.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/post.php index 393acace8..ec5806b78 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/post.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/Table/Type/post.php @@ -42,10 +42,7 @@ class post extends Table { case 2: $data["numberOfGlyphs"] = $font->readUInt16(); - $glyphNameIndex = array(); - for ($i = 0; $i < $data["numberOfGlyphs"]; $i++) { - $glyphNameIndex[] = $font->readUInt16(); - } + $glyphNameIndex = $font->readUInt16Many($data["numberOfGlyphs"]); $data["glyphNameIndex"] = $glyphNameIndex; diff --git a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/TrueType/File.php b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/TrueType/File.php index b8a580afd..b61da0f2e 100644 --- a/library/vendor/dompdf/lib/php-font-lib/src/FontLib/TrueType/File.php +++ b/library/vendor/dompdf/lib/php-font-lib/src/FontLib/TrueType/File.php @@ -305,7 +305,7 @@ class File extends BinaryStream { $class = "FontLib\\Table\\Type\\$name_canon"; - if (!isset($this->directory[$tag]) || !class_exists($class)) { + if (!isset($this->directory[$tag]) || !@class_exists($class)) { return; } } diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/DefaultStyle.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/DefaultStyle.php index cf528302d..c0535c726 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/DefaultStyle.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/DefaultStyle.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Document.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Document.php index 5291ffc84..4ecdc761a 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Document.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Document.php @@ -2,8 +2,8 @@ /** * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib - * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @author Fabien Ménager + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg; @@ -333,6 +333,9 @@ class Document extends AbstractTag case 'text': $tag = new Text($this, $name); break; + + case 'desc': + return; } if ($tag) { @@ -350,8 +353,6 @@ class Document extends AbstractTag $this->stack[] = $tag; $tag->handle($attributes); - } else { - echo "Unknown: '$name'\n"; } } @@ -400,4 +401,4 @@ class Document extends AbstractTag $tag->handleEnd(); } } -} \ No newline at end of file +} diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Gradient/Stop.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Gradient/Stop.php index 531d0bde6..14a36bdec 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Gradient/Stop.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Gradient/Stop.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Gradient; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Style.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Style.php index 4818ca4b6..9e7f6dba0 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Style.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Style.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien M�nager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php index 2e9130441..fc8579735 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien M�nager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Surface; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceGmagick.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceGmagick.php index 11aec0d55..5d41906e3 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceGmagick.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceGmagick.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien M�nager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Surface; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceInterface.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceInterface.php index 655dac0a2..fb007edee 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceInterface.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfaceInterface.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien M�nager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Surface; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php index f31d560a4..a4d17342b 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien M�nager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Surface; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/AbstractTag.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/AbstractTag.php index f3aae3754..7101ade83 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/AbstractTag.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/AbstractTag.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; @@ -21,7 +21,7 @@ abstract class AbstractTag /** @var Style */ protected $style; - protected $attributes; + protected $attributes = array(); protected $hasShape = true; @@ -180,4 +180,4 @@ abstract class AbstractTag } } } -} \ No newline at end of file +} diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Anchor.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Anchor.php index a44f5e578..9a4b3fe21 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Anchor.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Anchor.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Circle.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Circle.php index b1500f54d..2e516b408 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Circle.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Circle.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/ClipPath.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/ClipPath.php index 76599fd4e..54ee084c4 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/ClipPath.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/ClipPath.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Ellipse.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Ellipse.php index 3dbeea121..483e51e74 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Ellipse.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Ellipse.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Group.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Group.php index cb8aef2ab..542bfbdbd 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Group.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Group.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Image.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Image.php index cc813e098..f356b28de 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Image.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Image.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Line.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Line.php index 8dac2c264..42504bca5 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Line.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Line.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/LinearGradient.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/LinearGradient.php index 04b19bbc4..605ec23d9 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/LinearGradient.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/LinearGradient.php @@ -3,13 +3,13 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; -use Svg\Gradient\Stop; +use Svg\Gradient; use Svg\Style; class LinearGradient extends AbstractTag @@ -19,7 +19,7 @@ class LinearGradient extends AbstractTag protected $x2; protected $y2; - /** @var Stop[] */ + /** @var Gradient\Stop[] */ protected $stops = array(); public function start($attributes) @@ -47,7 +47,7 @@ class LinearGradient extends AbstractTag continue; } - $_stop = new Stop(); + $_stop = new Gradient\Stop(); $_attributes = $_child->attributes; // Style diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Path.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Path.php index 3cd33a532..c43d6388c 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Path.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Path.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Polygon.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Polygon.php index b7a3ed4ce..3100c5e08 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Polygon.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Polygon.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Polyline.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Polyline.php index 924084b92..c2837f586 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Polyline.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Polyline.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/RadialGradient.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/RadialGradient.php index 332da3a14..93987b393 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/RadialGradient.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/RadialGradient.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Rect.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Rect.php index f010e928f..7d32127f6 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Rect.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Rect.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Shape.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Shape.php index 1d7a12725..0a2bfaef5 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Shape.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Shape.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Stop.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Stop.php index cd131263c..666a2ac71 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Stop.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Stop.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/StyleTag.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/StyleTag.php index a26562d82..cda549346 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/StyleTag.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/StyleTag.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Text.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Text.php index 1e4c1df29..83b5afe6a 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Text.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/Text.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/UseTag.php b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/UseTag.php index 442cb6e45..b88a6cce1 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/UseTag.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/Svg/Tag/UseTag.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien M�nager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ namespace Svg\Tag; diff --git a/library/vendor/dompdf/lib/php-svg-lib/src/autoload.php b/library/vendor/dompdf/lib/php-svg-lib/src/autoload.php index 679569c82..b0e2b9cc4 100644 --- a/library/vendor/dompdf/lib/php-svg-lib/src/autoload.php +++ b/library/vendor/dompdf/lib/php-svg-lib/src/autoload.php @@ -3,7 +3,7 @@ * @package php-svg-lib * @link http://github.com/PhenX/php-svg-lib * @author Fabien Ménager - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html */ spl_autoload_register(function($class) {