1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-14 11:59:50 +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

@ -166,7 +166,7 @@
#define TR_CSWEQUAL "a=x\0 "
#define LEN_VCSWFUNC "\005"
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 ""Δ}x\0 ""|Δ|}x" TR_CSWTIMER TR_CSWSTICKY
#define TR_VCSWFUNC "---\0 " TR_CSWEQUAL "a~x\0 ""a>x\0 ""a<x\0 " TR_CSWRANGE "|a|>x""|a|<x""AND\0 ""OR\0 ""XOR\0 " TR_CSWSTAY "a=b\0 ""a>b\0 ""a<b\0 " STR_CHAR_DELTA "}x\0 ""|" STR_CHAR_DELTA "|}x" TR_CSWTIMER TR_CSWSTICKY
#define LEN_VFSWFUNC "\012"

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