Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Oct 26, 2024
1 parent 479a66f commit 1bcfedd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.0
2.6.1
2 changes: 1 addition & 1 deletion resources/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Vcs-Git: https://github.com/~#VENDOR#~/~#PROJECT#~.git
Package: ~#PKGNAME#~
Provides: php-~#PROJECT#~
Architecture: all
Depends: php (>= 8.0.0), php-json, php-zip, php-tecnickcom-tc-lib-file (<< 3.0.0), php-tecnickcom-tc-lib-file (>= 2.0.14), php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.14), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.6), php-tecnickcom-tc-lib-pdf-font-core (<< 2.0.0), php-tecnickcom-tc-lib-pdf-font-data-core (>= 1.8.7), ${misc:Depends}
Depends: php (>= 8.0.0), php-json, php-zip, php-tecnickcom-tc-lib-file (<< 3.0.0), php-tecnickcom-tc-lib-file (>= 2.0.15), php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.15), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.7), php-tecnickcom-tc-lib-pdf-font-core (<< 2.0.0), php-tecnickcom-tc-lib-pdf-font-data-core (>= 1.8.7), ${misc:Depends}
Description: PHP PDF Fonts Library
PHP library containing PDF font methods and utilities.
6 changes: 3 additions & 3 deletions resources/rpm/rpm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Requires: php-json
Requires: php-pcre
Requires: php-zlib
Requires: php-composer(%{c_vendor}/tc-lib-file) < 3.0.0
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 2.0.14
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 2.0.15
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) < 3.0.0
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.14
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.15
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.6
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.7
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font-data-core) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font-data-core) >= 1.8.7

Expand Down
32 changes: 16 additions & 16 deletions src/Import/TypeOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ protected function storeFontData(): void
*/
protected function extractFontInfo(): void
{
if (preg_match('#/FontName[\s]*\/([^\s]*)#', $this->font, $matches) !== 1) {
preg_match('#/FullName[\s]*\(([^\)]*)#', $this->font, $matches);
if (preg_match('#/FontName[\s]*+\/([^\s]*+)#', $this->font, $matches) !== 1) {
preg_match('#/FullName[\s]*+\(([^\)]*+)#', $this->font, $matches);
}

$name = preg_replace('/[^a-zA-Z0-9_\-]/', '', $matches[1]);
Expand All @@ -86,28 +86,28 @@ protected function extractFontInfo(): void
}

$this->fdt['name'] = $name;
preg_match('#/FontBBox[\s]*{([^}]*)#', $this->font, $matches);
preg_match('#/FontBBox[\s]*+{([^}]*+)#', $this->font, $matches);
$this->fdt['bbox'] = trim($matches[1]);
$bvl = explode(' ', $this->fdt['bbox']);
$this->fdt['Ascent'] = (int) $bvl[3];
$this->fdt['Descent'] = (int) $bvl[1];
preg_match('#/ItalicAngle[\s]*([0-9\+\-]*)#', $this->font, $matches);
preg_match('#/ItalicAngle[\s]*+([0-9\+\-]*+)#', $this->font, $matches);
$this->fdt['italicAngle'] = (int) $matches[1];

if ($this->fdt['italicAngle'] != 0) {
$this->fdt['Flags'] |= 64;
}

preg_match('#/UnderlinePosition[\s]*([0-9\+\-]*)#', $this->font, $matches);
preg_match('#/UnderlinePosition[\s]*+([0-9\+\-]*+)#', $this->font, $matches);
$this->fdt['underlinePosition'] = (int) $matches[1];
preg_match('#/UnderlineThickness[\s]*([0-9\+\-]*)#', $this->font, $matches);
preg_match('#/UnderlineThickness[\s]*+([0-9\+\-]*+)#', $this->font, $matches);
$this->fdt['underlineThickness'] = (int) $matches[1];
preg_match('#/isFixedPitch[\s]*([^\s]*)#', $this->font, $matches);
preg_match('#/isFixedPitch[\s]*+([^\s]*+)#', $this->font, $matches);
if ($matches[1] == 'true') {
$this->fdt['Flags'] = (((int) $this->fdt['Flags']) | 1);
}

preg_match('#/Weight[\s]*\(([^\)]*)#', $this->font, $matches);
preg_match('#/Weight[\s]*+\(([^\)]*+)#', $this->font, $matches);
if (! empty($matches[1])) {
$this->fdt['weight'] = strtolower($matches[1]);
}
Expand All @@ -124,7 +124,7 @@ protected function extractFontInfo(): void
protected function getInternalMap(): array
{
$imap = [];
if (preg_match_all('#dup[\s]([0-9]+)[\s]*/([^\s]*)[\s]put#sU', $this->font, $fmap, PREG_SET_ORDER) > 0) {
if (preg_match_all('#dup[\s]([0-9]+)[\s]*+/([^\s]*+)[\s]put#sU', $this->font, $fmap, PREG_SET_ORDER) > 0) {
foreach ($fmap as $val) {
$imap[$val[2]] = (int) $val[1];
}
Expand Down Expand Up @@ -160,12 +160,12 @@ protected function getEplain(): string
protected function extractEplainInfo(): array
{
$eplain = $this->getEplain();
if (preg_match('#/ForceBold[\s]*([^\s]*)#', $eplain, $matches) > 0 && $matches[1] == 'true') {
if (preg_match('#/ForceBold[\s]*+([^\s]*+)#', $eplain, $matches) > 0 && $matches[1] == 'true') {
$this->fdt['Flags'] |= 0x40000;
}

$this->extractStem($eplain);
if (preg_match('#/BlueValues[\s]*\[([^\]]*)#', $eplain, $matches) > 0) {
if (preg_match('#/BlueValues[\s]*+\[([^\]]*+)#', $eplain, $matches) > 0) {
$bvl = explode(' ', $matches[1]);
if (count($bvl) >= 6) {
$vl1 = (int) $bvl[2];
Expand All @@ -186,17 +186,17 @@ protected function extractEplainInfo(): array
*/
protected function extractStem(string $eplain): void
{
if (preg_match('#/StdVW[\s]*\[([^\]]*)#', $eplain, $matches) > 0) {
if (preg_match('#/StdVW[\s]*+\[([^\]]*+)#', $eplain, $matches) > 0) {
$this->fdt['StemV'] = (int) $matches[1];
} elseif (($this->fdt['weight'] == 'bold') || ($this->fdt['weight'] == 'black')) {
$this->fdt['StemV'] = 123;
} else {
$this->fdt['StemV'] = 70;
}

$this->fdt['StemH'] = preg_match('#/StdHW[\s]*\[([^\]]*)#', $eplain, $matches) > 0 ? (int) $matches[1] : 30;
$this->fdt['StemH'] = preg_match('#/StdHW[\s]*+\[([^\]]*+)#', $eplain, $matches) > 0 ? (int) $matches[1] : 30;

if (preg_match('#/Cap[X]?Height[\s]*\[([^\]]*)#', $eplain, $matches) > 0) {
if (preg_match('#/Cap[X]?Height[\s]*+\[([^\]]*+)#', $eplain, $matches) > 0) {
$this->fdt['CapHeight'] = (int) $matches[1];
} else {
$this->fdt['CapHeight'] = (int) $this->fdt['Ascent'];
Expand All @@ -211,7 +211,7 @@ protected function extractStem(string $eplain): void
protected function getRandomBytes(string $eplain): void
{
$this->fdt['lenIV'] = 4;
if (preg_match('#/lenIV[\s]*(\d*)#', $eplain, $matches) > 0) {
if (preg_match('#/lenIV[\s]*+([\d]*+)#', $eplain, $matches) > 0) {
$this->fdt['lenIV'] = (int) $matches[1];
}
}
Expand All @@ -223,7 +223,7 @@ protected function getCharstringData(string $eplain): array
{
$this->fdt['enc_map'] = [];
$eplain = substr($eplain, (strpos($eplain, '/CharStrings') + 1));
preg_match_all('#/([A-Za-z0-9\.]*)[\s][0-9]+[\s]RD[\s](.*)[\s]ND#sU', $eplain, $matches, PREG_SET_ORDER);
preg_match_all('#/([A-Za-z0-9\.]*+)[\s][0-9]+[\s]RD[\s](.*)[\s]ND#sU', $eplain, $matches, PREG_SET_ORDER);
if ($this->fdt['enc'] === '') {
return $matches;
}
Expand Down

0 comments on commit 1bcfedd

Please sign in to comment.