Description: 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.
Author: Giovanni Mascellani <gio@debian.org>
Forwarded: no
Last-Update: 2013-03-11

--- wotsap-0.7.orig/wotsap
+++ wotsap-0.7/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()
 
