Better fit the fonts inside the font-bitmaps
This commit is contained in:
@@ -107,7 +107,7 @@ class FontBitmap:
|
|||||||
self.extra_bitmap = None
|
self.extra_bitmap = None
|
||||||
continue
|
continue
|
||||||
elif is_cjk_char(c):
|
elif is_cjk_char(c):
|
||||||
w = self.draw_char(image, width, c, -3)
|
w = self.draw_char(image, width, c, 3)
|
||||||
else:
|
else:
|
||||||
w = self.draw_char(image, width, c)
|
w = self.draw_char(image, width, c)
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ class FontBitmap:
|
|||||||
|
|
||||||
_, top, _, bottom = self.get_real_size(image)
|
_, top, _, bottom = self.get_real_size(image)
|
||||||
|
|
||||||
top = 1
|
top = bottom - self.font_size - 2
|
||||||
# bottom = self.font_size
|
# bottom = self.font_size
|
||||||
image = image.crop((0, top, width - 1, bottom))
|
image = image.crop((0, top, width - 1, bottom))
|
||||||
coords.insert(0, bottom - top + 1)
|
coords.insert(0, bottom - top + 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user