Skip to content

Commit fb2d2c4

Browse files
committed
do not set current font on a new page if not defined
1 parent bccac94 commit fb2d2c4

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"tecnickcom/tc-lib-barcode": "^2.4",
3232
"tecnickcom/tc-lib-color": "^2.5",
3333
"tecnickcom/tc-lib-pdf-image": "^2.2",
34-
"tecnickcom/tc-lib-pdf-font": "^2.11",
34+
"tecnickcom/tc-lib-pdf-font": "^2.12",
3535
"tecnickcom/tc-lib-file": "^2.5",
3636
"tecnickcom/tc-lib-pdf-encrypt": "^2.2",
3737
"tecnickcom/tc-lib-unicode-data": "^2.0",

resources/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Depends: php (>= 8.1.0), php-date,
2222
php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0),
2323
php-tecnickcom-tc-lib-pdf-encrypt (>= 2.2.2),
2424
php-tecnickcom-tc-lib-pdf-font (<< 3.0.0),
25-
php-tecnickcom-tc-lib-pdf-font (>= 2.11.0),
25+
php-tecnickcom-tc-lib-pdf-font (>= 2.12.0),
2626
php-tecnickcom-tc-lib-pdf-graph (<< 3.0.0),
2727
php-tecnickcom-tc-lib-pdf-graph (>= 2.4.24),
2828
php-tecnickcom-tc-lib-pdf-image (<< 3.0.0),

resources/rpm/rpm.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.5.3
2424
Requires: php-composer(%{c_vendor}/tc-lib-pdf-image) < 3.0.0
2525
Requires: php-composer(%{c_vendor}/tc-lib-pdf-image) >= 2.2.2
2626
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font) < 3.0.0
27-
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font) >= 2.11.0
27+
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font) >= 2.12.0
2828
Requires: php-composer(%{c_vendor}/tc-lib-file) < 3.0.0
2929
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 2.5.2
3030
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0

src/Text.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,9 @@ public function addPage(array $data = []): array
20552055
*/
20562056
protected function setPageContext(int $pid = -1): void
20572057
{
2058-
$this->page->addContent($this->font->getOutCurrentFont(), $pid);
2058+
if ($this->font->hasCurrentFont()) {
2059+
$this->page->addContent($this->font->getOutCurrentFont(), $pid);
2060+
}
20592061
if ($this->defPageContentEnabled) {
20602062
$this->page->addContent($this->defaultPageContent($pid), $pid);
20612063
}

0 commit comments

Comments
 (0)