mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-14 20:10:04 +03:00
patch special chars
This commit is contained in:
parent
a74c161d44
commit
23e1531c72
2 changed files with 6 additions and 3 deletions
|
@ -166,7 +166,7 @@
|
||||||
#define TR_CSWEQUAL "a=x\0 "
|
#define TR_CSWEQUAL "a=x\0 "
|
||||||
|
|
||||||
#define LEN_VCSWFUNC "\005"
|
#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"
|
#define LEN_VFSWFUNC "\012"
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from PIL import Image, ImageDraw, ImageFont
|
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:
|
class FontBitmap:
|
||||||
|
@ -99,14 +99,17 @@ class FontBitmap:
|
||||||
w = self.draw_char(image, width, c, self.cjk_font, -3)
|
w = self.draw_char(image, width, c, self.cjk_font, -3)
|
||||||
elif c in extra_chars:
|
elif c in extra_chars:
|
||||||
if self.extra_bitmap:
|
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))
|
image.paste(self.extra_bitmap.copy(), (width, 0))
|
||||||
for coord in [14, 14, 12, 12, 13, 13, 13, 13, 13] + [15] * 12:
|
for coord in [14, 14, 12, 12, 13, 13, 13, 13, 13] + [15] * 12:
|
||||||
width += coord
|
|
||||||
coords.append(width)
|
coords.append(width)
|
||||||
|
width += coord
|
||||||
self.extra_bitmap = None
|
self.extra_bitmap = None
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
w = self.draw_char(image, width, c, self.font)
|
w = self.draw_char(image, width, c, self.font)
|
||||||
|
|
||||||
coords.append(width)
|
coords.append(width)
|
||||||
width += w
|
width += w
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue