mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-19 14:25:09 +03:00
Cosmetics
This commit is contained in:
parent
25df4881b6
commit
45a75c1c2b
1 changed files with 1 additions and 2 deletions
|
@ -46,7 +46,7 @@ class FontBitmap:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_column_needed(px, x, height):
|
def is_column_needed(px, x, height):
|
||||||
for y in range(height):
|
for y in range(height):
|
||||||
if px[x, y] != (255, 255, 255):
|
if sum(px[x, y]) <= 3 * 0xC6:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -89,7 +89,6 @@ class FontBitmap:
|
||||||
def generate(self, filename, generate_coords_file=True):
|
def generate(self, filename, generate_coords_file=True):
|
||||||
coords = []
|
coords = []
|
||||||
image = Image.new("RGB", (len(self.chars) * self.font_size, self.font_size + 10), self.background)
|
image = Image.new("RGB", (len(self.chars) * self.font_size, self.font_size + 10), self.background)
|
||||||
draw = ImageDraw.Draw(image)
|
|
||||||
|
|
||||||
width = 0
|
width = 0
|
||||||
for c in self.chars:
|
for c in self.chars:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue