[perl-Cairo] Try to find more font files in the FT test



commit efc8e1ee2cabff46415f7db5d6c3eef75edb2fdf
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun May 16 15:39:09 2010 +0200

    Try to find more font files in the FT test

 t/CairoFt.t |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/t/CairoFt.t b/t/CairoFt.t
index aa0ac4a..18c363f 100644
--- a/t/CairoFt.t
+++ b/t/CairoFt.t
@@ -18,8 +18,13 @@ unless (Cairo::HAS_FT_FONT && eval 'use Font::FreeType; 1;') {
 	plan skip_all => 'need Cairo with FreeType support and Font::FreeType';
 }
 
-my $file = '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf';
-unless (-r $file) {
+my @files_to_try = qw(
+  /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf
+  /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
+);
+my @files_found = grep { -r $_ } @files_to_try;
+my $file = $files_found[0];
+unless ($file) {
 	plan skip_all => 'can\'t find font file';
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]