From 3c361ba5e781f6b039a63756f74a7f23f81c525d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 14 Apr 2026 12:23:05 +0200 Subject: fix default font directory --- php-tecnickcom-tc-lib-pdf-font-rpm.patch | 34 ++++++++++++++++++++++++++++---- php-tecnickcom-tc-lib-pdf-font.spec | 2 ++ 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/php-tecnickcom-tc-lib-pdf-font-rpm.patch b/php-tecnickcom-tc-lib-pdf-font-rpm.patch index 4f76916..90cf22f 100644 --- a/php-tecnickcom-tc-lib-pdf-font-rpm.patch +++ b/php-tecnickcom-tc-lib-pdf-font-rpm.patch @@ -1,6 +1,32 @@ +diff -up ./src/Load.php.rpm ./src/Load.php +--- ./src/Load.php.rpm 2026-04-11 18:57:51.000000000 +0200 ++++ ./src/Load.php 2026-04-14 12:16:20.395083087 +0200 +@@ -359,6 +359,10 @@ abstract class Load + { + $dir = new Dir(); + $dirs = ['']; ++ $glb = \glob('/usr/share/php-tecnickcom-tc-lib-pdf-font/*', GLOB_ONLYDIR); ++ if ($glb !== false) { ++ $dirs = [...$dirs, ...$glb]; ++ } + if (\defined('K_PATH_FONTS')) { + $dirs[] = K_PATH_FONTS; + $glb = \glob(K_PATH_FONTS . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR); +diff -up ./test/OutputTest.php.rpm ./test/OutputTest.php +--- ./test/OutputTest.php.rpm 2026-04-14 12:18:43.369505233 +0200 ++++ ./test/OutputTest.php 2026-04-14 12:19:26.395635970 +0200 +@@ -75,7 +75,7 @@ class OutputTest extends TestUtil + $encrypt = new \Com\Tecnick\Pdf\Encrypt\Encrypt(); + $output = new \Com\Tecnick\Pdf\Font\Output($fonts, $objnum, $encrypt); + +- $this->assertEquals(37, $output->getObjectNumber()); ++ $this->assertTrue($output->getObjectNumber() > 30); + + $this->assertNotEmpty($output->getFontsBlock()); + diff -up ./util/bulk_convert.php.rpm ./util/bulk_convert.php ---- ./util/bulk_convert.php.rpm 2025-12-05 07:31:19.501111222 +0100 -+++ ./util/bulk_convert.php 2025-12-05 07:33:19.462370628 +0100 +--- ./util/bulk_convert.php.rpm 2026-04-11 18:57:51.000000000 +0200 ++++ ./util/bulk_convert.php 2026-04-14 12:16:20.395188715 +0200 @@ -86,7 +86,7 @@ if (!\is_writable($options['outpath'])) exit(2); } @@ -20,8 +46,8 @@ diff -up ./util/bulk_convert.php.rpm ./util/bulk_convert.php $fontdir = \array_diff(\scandir($ttfdir), array('.', '..', '.git')); diff -up ./util/convert.php.rpm ./util/convert.php ---- ./util/convert.php.rpm 2025-12-05 07:31:19.501170686 +0100 -+++ ./util/convert.php 2025-12-05 07:33:51.032586961 +0100 +--- ./util/convert.php.rpm 2026-04-11 18:57:51.000000000 +0200 ++++ ./util/convert.php 2026-04-14 12:16:20.395243397 +0200 @@ -224,7 +224,7 @@ if (empty($options['fonts'])) { $convert_errors = 0; $convert_success = 0; diff --git a/php-tecnickcom-tc-lib-pdf-font.spec b/php-tecnickcom-tc-lib-pdf-font.spec index 0228ac5..f9fee7f 100644 --- a/php-tecnickcom-tc-lib-pdf-font.spec +++ b/php-tecnickcom-tc-lib-pdf-font.spec @@ -108,6 +108,7 @@ The initial source code has been extracted from TCPDF (http://www.tcpdf.org). %forgesetup tar xf %{SOURCE1} %patch -P0 -p0 -b .rpm +find src -name \*.rpm -delete -print : Sanity check grep -q '^%{version}$' VERSION @@ -212,6 +213,7 @@ exit $ret %changelog * Tue Apr 14 2026 Remi Collet - 2.6.36-1 - update to 2.6.36 (no change) +- fix default font directory * Tue Mar 31 2026 Remi Collet - 2.6.34-1 - update to 2.6.34 (no change) -- cgit