1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-13 19:40:16 +03:00

patch special chars

This commit is contained in:
3djc 2020-11-27 11:18:57 +01:00
parent a74c161d44
commit 23e1531c72
2 changed files with 6 additions and 3 deletions

View file

@ -5,7 +5,7 @@ import argparse
import os
import sys
from PIL import Image, ImageDraw, ImageFont
from charset import get_chars, special_chars, extra_chars
from charset import get_chars, special_chars, extra_chars, standard_chars
class FontBitmap:
@ -99,14 +99,17 @@ class FontBitmap:
w = self.draw_char(image, width, c, self.cjk_font, -3)
elif c in extra_chars:
if self.extra_bitmap:
for i in range(128 - 32 - len(standard_chars) - 1):
coords.append(width)
image.paste(self.extra_bitmap.copy(), (width, 0))
for coord in [14, 14, 12, 12, 13, 13, 13, 13, 13] + [15] * 12:
width += coord
coords.append(width)
width += coord
self.extra_bitmap = None
continue
else:
w = self.draw_char(image, width, c, self.font)
coords.append(width)
width += w