From 90364c26950d2028234870eb4a9b6f6f10d61536 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Wed, 14 Apr 2021 09:19:37 +0200 Subject: [PATCH] Better fit the fonts inside the font-bitmaps --- tools/build-font-bitmap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build-font-bitmap.py b/tools/build-font-bitmap.py index a0fd84b30..d3176834e 100755 --- a/tools/build-font-bitmap.py +++ b/tools/build-font-bitmap.py @@ -107,7 +107,7 @@ class FontBitmap: self.extra_bitmap = None continue elif is_cjk_char(c): - w = self.draw_char(image, width, c, -3) + w = self.draw_char(image, width, c, 3) else: w = self.draw_char(image, width, c) @@ -118,7 +118,7 @@ class FontBitmap: _, top, _, bottom = self.get_real_size(image) - top = 1 + top = bottom - self.font_size - 2 # bottom = self.font_size image = image.crop((0, top, width - 1, bottom)) coords.insert(0, bottom - top + 1)