From: Giovanni Mascellani <gio@debian.org>
Date: Mon, 28 May 2018 15:44:06 +0200
Subject: Prefer TTF system fonts

By default wotsap ships a bitmap font used to raster images if no other is
specified. Such font is rather ugly, so we modify the code in order to
default to some TTF fonts available in the system.
Forwarded: no
Last-Update: 2013-03-11
---
 wotsap | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/wotsap b/wotsap
index 719e7b3..a31e50a 100755
--- a/wotsap
+++ b/wotsap
@@ -1494,6 +1494,20 @@ class Wot:
             self.font = ImageFont.load(fontfile)
             return
 
+        # Modified by Giovanni Mascellani <gio@debian.org> for Debian packaging
+        # If no fonts are specified on command line tries first for existing TTF
+        # before falling back to the built-in one.
+	try:
+            self.font = ImageFont.truetype("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", ttffilesize)
+            return
+	except IOError:
+            pass
+	try:
+            self.font = ImageFont.truetype("/usr/share/fonts/truetype/freefont/FreeSans.ttf", ttffilesize)
+            return
+	except IOError:
+            pass
+
         import StringIO, base64, zlib
         self.font = ImageFont.ImageFont()
 
