From 45a75c1c2bd33696c677c6b5e6ed2ab4df40ffe4 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Mon, 9 Dec 2019 16:17:41 +0100 Subject: [PATCH] Cosmetics --- tools/build-font-bitmap.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/build-font-bitmap.py b/tools/build-font-bitmap.py index 8d5e54b24..050e15e44 100755 --- a/tools/build-font-bitmap.py +++ b/tools/build-font-bitmap.py @@ -46,7 +46,7 @@ class FontBitmap: @staticmethod def is_column_needed(px, x, height): for y in range(height): - if px[x, y] != (255, 255, 255): + if sum(px[x, y]) <= 3 * 0xC6: return True return False @@ -89,7 +89,6 @@ class FontBitmap: def generate(self, filename, generate_coords_file=True): coords = [] image = Image.new("RGB", (len(self.chars) * self.font_size, self.font_size + 10), self.background) - draw = ImageDraw.Draw(image) width = 0 for c in self.chars: