Blob Blame Raw
From 3b7f62ee3f62264801096d51d89f5ec1d84c22dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Mon, 25 Sep 2017 11:31:22 +0200
Subject: [PATCH] Use specific font by ImageMagick
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Tests use ImageMagick to draw labels into pictures. This does not work
with ImageMagick-6.9.9.13-1.fc28.x86_64 and
rw-base35-fonts-20170801-1.fc28:

$ convert label:"The quick brown fox" test.png
convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1362.
convert: no images defined `test.png' @ error/convert.c/ConvertImageCommand/3258.

This patch specifies DejaVu-Sans font explicitly.

<https://bugzilla.redhat.com/show_bug.cgi?id=1494563>

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 t/1122_save_pdf_with_hocr.t      | 2 +-
 t/113_save_pdf_with_downsample.t | 2 +-
 t/134_save_tiff_alpha.t          | 4 ++--
 t/1621_import_pdf.t              | 4 ++--
 t/1625_import_pdf_bw.t           | 4 ++--
 t/31_ocropus.t                   | 6 +++---
 t/32_ocropus_in_thread.t         | 2 +-
 t/33_cancel_ocropus.t            | 2 +-
 t/351_unpaper.t                  | 2 +-
 t/352_unpaper.t                  | 2 +-
 t/353_cancel_unpaper.t           | 4 ++--
 t/354_unpaper_with_error.t       | 2 +-
 t/355_unpaper2.t                 | 4 ++--
 t/356_unpaper_corrupt_image.t    | 2 +-
 t/357_unpaper_rtl.t              | 4 ++--
 t/358_unpaper_with_warning.t     | 2 +-
 t/411_tesseract.t                | 6 +++---
 t/412_tesseract_in_thread.t      | 2 +-
 t/413_cancel_tesseract.t         | 2 +-
 t/414_tesseract_with_error.t     | 2 +-
 t/421_cuneiform.t                | 6 +++---
 t/422_cuneiform_in_thread.t      | 2 +-
 t/423_cancel_cuneiform.t         | 2 +-
 t/424_cuneiform_with_error.t     | 2 +-
 t/431_gocr.t                     | 2 +-
 t/432_gocr.t                     | 2 +-
 t/433_cancel_gocr.t              | 2 +-
 t/434_gocr_with_error.t          | 2 +-
 t/51_process_chain.t             | 2 +-
 29 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/t/1122_save_pdf_with_hocr.t b/t/1122_save_pdf_with_hocr.t
index f052d83c..63a62f78 100644
--- a/t/1122_save_pdf_with_hocr.t
+++ b/t/1122_save_pdf_with_hocr.t
@@ -18,7 +18,7 @@ Gscan2pdf::Document->setup($logger);
 
 # Create test image
 system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -units PixelsPerInch -density 300 label:"The quick brown fox" -border 20x10 test.png'
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -units PixelsPerInch -density 300 label:"The quick brown fox" -border 20x10 test.png'
 );
 my $info = `identify test.png`;
 my ( $width, $height );
diff --git a/t/113_save_pdf_with_downsample.t b/t/113_save_pdf_with_downsample.t
index 7bee33a0..8b72d026 100644
--- a/t/113_save_pdf_with_downsample.t
+++ b/t/113_save_pdf_with_downsample.t
@@ -18,7 +18,7 @@ Gscan2pdf::Document->setup($logger);
 
 # Create test image
 system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
 );
 
 my $slist = Gscan2pdf::Document->new;
diff --git a/t/134_save_tiff_alpha.t b/t/134_save_tiff_alpha.t
index 333ac806..d1280cfa 100644
--- a/t/134_save_tiff_alpha.t
+++ b/t/134_save_tiff_alpha.t
@@ -17,7 +17,7 @@ Gscan2pdf::Document->setup($logger);
 
 # Create test image
 system(
-'convert -fill lightblue -pointsize 12 -units PixelsPerInch -density 300 label:"The quick brown fox" test.png'
+'convert -fill lightblue -font DejaVu-Sans -pointsize 12 -units PixelsPerInch -density 300 label:"The quick brown fox" test.png'
 );
 
 my $slist = Gscan2pdf::Document->new;
@@ -43,7 +43,7 @@ Gtk2->main;
 
 like(
     `identify test.tif`,
-    qr/test.tif TIFF 4\d\dx\d\d 4\d\dx\d\d\+0\+0 16-bit sRGB/,
+    qr/test.tif TIFF \d\d\dx\d\d \d\d\dx\d\d\+0\+0 16-bit sRGB/,
     'valid TIFF created'
 );
 
diff --git a/t/1621_import_pdf.t b/t/1621_import_pdf.t
index 22d15a09..907739cc 100644
--- a/t/1621_import_pdf.t
+++ b/t/1621_import_pdf.t
@@ -20,7 +20,7 @@ Gscan2pdf::Document->setup($logger);
 
 # Create b&w test image
 system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -units PixelsPerInch -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -units PixelsPerInch -density 300 label:"The quick brown fox" test.png'
 );
 
 # Add text layer with tesseract
@@ -29,7 +29,7 @@ if ($tess_installed) {
 }
 else {
     system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:"The quick brown fox" test.pdf'
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.pdf'
     );
 }
 
diff --git a/t/1625_import_pdf_bw.t b/t/1625_import_pdf_bw.t
index 8f738b50..373cdfe6 100644
--- a/t/1625_import_pdf_bw.t
+++ b/t/1625_import_pdf_bw.t
@@ -18,10 +18,10 @@ Gscan2pdf::Document->setup($logger);
 
 # Create test image
 system(
-'convert +matte -depth 1 -colorspace Gray -type Bilevel -pointsize 12 -density 300 label:"The quick brown fox" test.pdf'
+'convert +matte -depth 1 -colorspace Gray -type Bilevel -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.pdf'
 );
 system(
-'convert +matte -depth 1 -colorspace Gray -type Bilevel -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -colorspace Gray -type Bilevel -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
 );
 my $old = `identify -format '%m %G %g %z-bit %r' test.png`;
 
diff --git a/t/31_ocropus.t b/t/31_ocropus.t
index fad08a81..81a1b6f9 100644
--- a/t/31_ocropus.t
+++ b/t/31_ocropus.t
@@ -19,7 +19,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     my $got = Gscan2pdf::Ocropus->hocr(
@@ -32,7 +32,7 @@ SKIP: {
 
     # Create colour test image
     system(
-'convert -fill lightblue -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert -fill lightblue -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     $got = Gscan2pdf::Ocropus->hocr(
@@ -55,7 +55,7 @@ SKIP: {
 
     # Create test image
     system(
-"convert +matte -depth 1 -pointsize 12 -density 300 label:'öÖäÄüÜß' test.png"
+"convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:'öÖäÄüÜß' test.png"
     );
 
     $got = Gscan2pdf::Ocropus->hocr(
diff --git a/t/32_ocropus_in_thread.t b/t/32_ocropus_in_thread.t
index adeaa4f8..e7a03ecd 100644
--- a/t/32_ocropus_in_thread.t
+++ b/t/32_ocropus_in_thread.t
@@ -23,7 +23,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/33_cancel_ocropus.t b/t/33_cancel_ocropus.t
index 429548ce..469432b1 100644
--- a/t/33_cancel_ocropus.t
+++ b/t/33_cancel_ocropus.t
@@ -20,7 +20,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/351_unpaper.t b/t/351_unpaper.t
index 31ddd2cc..9a95e1bb 100644
--- a/t/351_unpaper.t
+++ b/t/351_unpaper.t
@@ -45,7 +45,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert -size 2100x2970 +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
+'convert -size 2100x2970 +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/352_unpaper.t b/t/352_unpaper.t
index 481cd40d..ad597b20 100644
--- a/t/352_unpaper.t
+++ b/t/352_unpaper.t
@@ -45,7 +45,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert -size 2550x3507 +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
+'convert -size 2550x3507 +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/353_cancel_unpaper.t b/t/353_cancel_unpaper.t
index 5c611ef9..3a684fbc 100644
--- a/t/353_cancel_unpaper.t
+++ b/t/353_cancel_unpaper.t
@@ -24,10 +24,10 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The quick brown fox" 1.pnm'
+'convert +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" 1.pnm'
     );
     system(
-'convert +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The slower lazy dog" 2.pnm'
+'convert +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The slower lazy dog" 2.pnm'
     );
     system('convert -size 100x100 xc:black black.pnm');
     system('convert 1.pnm black.pnm 2.pnm +append test.pnm');
diff --git a/t/354_unpaper_with_error.t b/t/354_unpaper_with_error.t
index 38ccd262..236ee5b6 100644
--- a/t/354_unpaper_with_error.t
+++ b/t/354_unpaper_with_error.t
@@ -45,7 +45,7 @@ SKIP: {
     # Create test image
     my $filename = 'test.png';
     system(
-"convert -size 2100x2970 +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:'The quick brown fox' $filename"
+"convert -size 2100x2970 +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:'The quick brown fox' $filename"
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/355_unpaper2.t b/t/355_unpaper2.t
index 616d0379..a785d5f5 100644
--- a/t/355_unpaper2.t
+++ b/t/355_unpaper2.t
@@ -22,10 +22,10 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The quick brown fox" 1.pnm'
+'convert +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" 1.pnm'
     );
     system(
-'convert +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The slower lazy dog" 2.pnm'
+'convert +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The slower lazy dog" 2.pnm'
     );
     system('convert -size 100x100 xc:black black.pnm');
     system('convert 1.pnm black.pnm 2.pnm +append test.pnm');
diff --git a/t/356_unpaper_corrupt_image.t b/t/356_unpaper_corrupt_image.t
index e1fc38af..519d21c4 100644
--- a/t/356_unpaper_corrupt_image.t
+++ b/t/356_unpaper_corrupt_image.t
@@ -51,7 +51,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert -size 2100x2970 +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
+'convert -size 2100x2970 +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
     );
 
     $slist->import_files(
diff --git a/t/357_unpaper_rtl.t b/t/357_unpaper_rtl.t
index eb21086a..08d18d27 100644
--- a/t/357_unpaper_rtl.t
+++ b/t/357_unpaper_rtl.t
@@ -23,10 +23,10 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The quick brown fox" 1.pnm'
+'convert +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" 1.pnm'
     );
     system(
-'convert +matte -depth 1 -border 2x2 -bordercolor black -pointsize 12 -density 300 label:"The slower lazy dog" 2.pnm'
+'convert +matte -depth 1 -border 2x2 -bordercolor black -font DejaVu-Sans -pointsize 12 -density 300 label:"The slower lazy dog" 2.pnm'
     );
     system('convert -size 100x100 xc:black black.pnm');
     system('convert 1.pnm black.pnm 2.pnm +append test.pnm');
diff --git a/t/358_unpaper_with_warning.t b/t/358_unpaper_with_warning.t
index 51fb82ec..f505cf53 100644
--- a/t/358_unpaper_with_warning.t
+++ b/t/358_unpaper_with_warning.t
@@ -25,7 +25,7 @@ SKIP: {
     # Create test image
     my $filename = 'test.png';
     system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:"The quick brown fox" -rotate 20 '
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" -rotate 20 '
           . $filename );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/411_tesseract.t b/t/411_tesseract.t
index f222006e..bb91116c 100644
--- a/t/411_tesseract.t
+++ b/t/411_tesseract.t
@@ -81,7 +81,7 @@ SKIP: {
 
     # Create b&w test image
     system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     my ( $got, $messages ) = Gscan2pdf::Tesseract->hocr(
@@ -97,7 +97,7 @@ SKIP: {
 
     # Create colour test image
     system(
-'convert -fill lightblue -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert -fill lightblue -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     ( $got, $messages ) = Gscan2pdf::Tesseract->hocr(
@@ -118,7 +118,7 @@ SKIP: {
 
     # Create b&w test image
     system(
-"convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:'öÖäÄüÜß' test.png"
+"convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:'öÖäÄüÜß' test.png"
     );
 
     ( $got, $messages ) = Gscan2pdf::Tesseract->hocr(
diff --git a/t/412_tesseract_in_thread.t b/t/412_tesseract_in_thread.t
index 69b5f248..930331a0 100644
--- a/t/412_tesseract_in_thread.t
+++ b/t/412_tesseract_in_thread.t
@@ -23,7 +23,7 @@ SKIP: {
     # Deliberately not setting -units to provoke
     # "Invalid resolution 0 dpi. Using 70 instead." warning from tesseract
     system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/413_cancel_tesseract.t b/t/413_cancel_tesseract.t
index 33aff266..6cb4c8f9 100644
--- a/t/413_cancel_tesseract.t
+++ b/t/413_cancel_tesseract.t
@@ -22,7 +22,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:"The quick brown fox" test.tif'
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.tif'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/414_tesseract_with_error.t b/t/414_tesseract_with_error.t
index 1268bb7c..c7d2800d 100644
--- a/t/414_tesseract_with_error.t
+++ b/t/414_tesseract_with_error.t
@@ -23,7 +23,7 @@ SKIP: {
     # Create test image
     my $filename = 'test.png';
     system(
-"convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:'The quick brown fox' $filename"
+"convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:'The quick brown fox' $filename"
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/421_cuneiform.t b/t/421_cuneiform.t
index 51cff006..38ec42a9 100644
--- a/t/421_cuneiform.t
+++ b/t/421_cuneiform.t
@@ -19,7 +19,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     my $got = Gscan2pdf::Cuneiform->hocr(
@@ -32,7 +32,7 @@ SKIP: {
 
     # Create colour test image
     system(
-'convert -fill lightblue -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert -fill lightblue -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     $got = Gscan2pdf::Cuneiform->hocr(
@@ -50,7 +50,7 @@ SKIP: {
 
     # Create test image
     system(
-"convert +matte -depth 1 -pointsize 12 -density 300 label:'öÖäÄüÜß' test.png"
+"convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:'öÖäÄüÜß' test.png"
     );
 
     $got = Gscan2pdf::Cuneiform->hocr(
diff --git a/t/422_cuneiform_in_thread.t b/t/422_cuneiform_in_thread.t
index bc622a0d..dff71cda 100644
--- a/t/422_cuneiform_in_thread.t
+++ b/t/422_cuneiform_in_thread.t
@@ -24,7 +24,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/423_cancel_cuneiform.t b/t/423_cancel_cuneiform.t
index 1db9a621..c404e6fe 100644
--- a/t/423_cancel_cuneiform.t
+++ b/t/423_cancel_cuneiform.t
@@ -23,7 +23,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"The quick brown fox" test.png'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.png'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/424_cuneiform_with_error.t b/t/424_cuneiform_with_error.t
index 1f1ab3e1..61bac7ad 100644
--- a/t/424_cuneiform_with_error.t
+++ b/t/424_cuneiform_with_error.t
@@ -23,7 +23,7 @@ SKIP: {
     # Create test image
     my $filename = 'test.png';
     system(
-"convert +matte -depth 1 -pointsize 12 -density 300 label:'The quick brown fox' $filename"
+"convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:'The quick brown fox' $filename"
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/431_gocr.t b/t/431_gocr.t
index 793c3628..563ec438 100644
--- a/t/431_gocr.t
+++ b/t/431_gocr.t
@@ -21,7 +21,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/432_gocr.t b/t/432_gocr.t
index 1b03e07f..306b0c88 100644
--- a/t/432_gocr.t
+++ b/t/432_gocr.t
@@ -22,7 +22,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"öÖäÄüÜß" test.pnm'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"öÖäÄüÜß" test.pnm'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/433_cancel_gocr.t b/t/433_cancel_gocr.t
index 4bf84c95..799a0557 100644
--- a/t/433_cancel_gocr.t
+++ b/t/433_cancel_gocr.t
@@ -21,7 +21,7 @@ SKIP: {
 
     # Create test image
     system(
-'convert +matte -depth 1 -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
+'convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" test.pnm'
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/434_gocr_with_error.t b/t/434_gocr_with_error.t
index 233306aa..08c1d6e4 100644
--- a/t/434_gocr_with_error.t
+++ b/t/434_gocr_with_error.t
@@ -22,7 +22,7 @@ SKIP: {
     # Create test image
     my $filename = 'test.pnm';
     system(
-"convert +matte -depth 1 -pointsize 12 -density 300 label:'The quick brown fox' $filename"
+"convert +matte -depth 1 -font DejaVu-Sans -pointsize 12 -density 300 label:'The quick brown fox' $filename"
     );
 
     my $slist = Gscan2pdf::Document->new;
diff --git a/t/51_process_chain.t b/t/51_process_chain.t
index 4c823ae9..4d4ee54c 100644
--- a/t/51_process_chain.t
+++ b/t/51_process_chain.t
@@ -33,7 +33,7 @@ SKIP: {
 
     # Create b&w test image
     system(
-'convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300 label:"The quick brown fox" -rotate -90 test.pnm'
+'convert +matte -depth 1 -colorspace Gray -font DejaVu-Sans -pointsize 12 -density 300 label:"The quick brown fox" -rotate -90 test.pnm'
     );
 
     $slist->import_scan(
-- 
2.13.5