build(boards): xpython板卡执行 npm run build:prod

This commit is contained in:
王立帮
2025-07-12 18:26:50 +08:00
parent 04d3f373e7
commit 047c028587
53 changed files with 15427 additions and 325 deletions

View File

@@ -417,6 +417,7 @@ class FrameBuffer_Uincode(FrameBuffer_Base):
if sync: self.fill(bg_color, sync=False)
self.set_buffer(data, sync)
else:
yy = y
if size is None:
font_len, font_buffer = self._take_buffer(str(data), space, 1)
size = min((self.width // font_len) if font_len > 0 else 1, self.height // self._font.height)
@@ -424,7 +425,11 @@ class FrameBuffer_Uincode(FrameBuffer_Base):
font_len, font_buffer = self._take_buffer(str(data), space, size)
x = (self.width - font_len + space) // 2 if center else x
y = (self.height - self._font.height * size) // 2 if y is None else y
if sync: self.fill(bg_color, sync=False)
if sync:
if yy is None:
self.fill(bg_color, sync=False)
else:
self.fill_rect(0, y - 1, self.width, self._font.height * size + 2, bg_color, sync=False)
for buffer in font_buffer: #Display character
self.bitmap(buffer, x, y, size, bold, color)
x = buffer[1][0] * size + x + space