diff options
| author | Remi Collet <remi@remirepo.net> | 2026-05-16 15:38:33 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-05-16 15:38:33 +0200 |
| commit | 8243434f684a373cac5226d684c6e168c8e3a45e (patch) | |
| tree | c0d546f41fd08e076e330a5cfa7d88f6e8f95fe1 /3.patch | |
open https://github.com/iliaal/fastchart/pull/1 fix test, ensure searching in the right place
open https://github.com/iliaal/fastchart/pull/2 Fix undefined $ext_builddir
open https://github.com/iliaal/fastchart/pull/3 fix tests, more font paths
Diffstat (limited to '3.patch')
| -rw-r--r-- | 3.patch | 68 |
1 files changed, 68 insertions, 0 deletions
@@ -0,0 +1,68 @@ +From f6886b20c95a185bf7497830aaa026cc72cbb169 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Sat, 16 May 2026 15:32:49 +0200 +Subject: [PATCH] fix tests, more font paths for RPM dsitro + +--- + tests/089_font_cache_open_basedir.phpt | 2 ++ + tests/129_svg_text_modes.phpt | 1 + + tests/131_raster_formats_per_family.phpt | 14 ++++++++++---- + 3 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/tests/089_font_cache_open_basedir.phpt b/tests/089_font_cache_open_basedir.phpt +index b92c95b..c19055c 100644 +--- a/tests/089_font_cache_open_basedir.phpt ++++ b/tests/089_font_cache_open_basedir.phpt +@@ -12,6 +12,7 @@ $cands = [ + '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', + '/usr/share/fonts/dejavu/DejaVuSans.ttf', + '/usr/share/fonts/TTF/DejaVuSans.ttf', ++ '/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf', + ]; + $ok = false; + foreach ($cands as $c) { if (file_exists($c)) { $ok = true; break; } } +@@ -34,6 +35,7 @@ $font_candidates = [ + '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', + '/usr/share/fonts/dejavu/DejaVuSans.ttf', + '/usr/share/fonts/TTF/DejaVuSans.ttf', ++ '/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf', + ]; + $font = null; + foreach ($font_candidates as $cand) { +diff --git a/tests/129_svg_text_modes.phpt b/tests/129_svg_text_modes.phpt +index 1ce6ed5..295c207 100644 +--- a/tests/129_svg_text_modes.phpt ++++ b/tests/129_svg_text_modes.phpt +@@ -12,6 +12,7 @@ $candidates = [ + '/usr/share/fonts/truetype/lato/Lato-Regular.ttf', + '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', + '/usr/share/fonts/dejavu/DejaVuSans.ttf', ++ '/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf', + ]; + $font = ''; + foreach ($candidates as $p) { if (is_readable($p)) { $font = $p; break; } } +diff --git a/tests/131_raster_formats_per_family.phpt b/tests/131_raster_formats_per_family.phpt +index f8272f1..13082b9 100644 +--- a/tests/131_raster_formats_per_family.phpt ++++ b/tests/131_raster_formats_per_family.phpt +@@ -12,10 +12,16 @@ gd + * instance of every chart family and asserts the four output + * formats each produce magic-byte-correct bytes at non-trivial size. */ + +-$lato = '/usr/share/fonts/truetype/lato/Lato-Regular.ttf'; +-$font = is_readable($lato) ? $lato +- : '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf'; +-if (!is_readable($font)) die("skip no system font available\n"); ++// Pick a system font; fall back across distros. ++$candidates = [ ++ '/usr/share/fonts/truetype/lato/Lato-Regular.ttf', ++ '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', ++ '/usr/share/fonts/dejavu/DejaVuSans.ttf', ++ '/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf', ++]; ++$font = ''; ++foreach ($candidates as $p) { if (is_readable($p)) { $font = $p; break; } } ++if ($font === '') die("skip no system font found\n"); + + $ohlcv = []; + for ($i = 0; $i < 8; $i++) { |
