MicroPython-uFont icon indicating copy to clipboard operation
MicroPython-uFont copied to clipboard

GC9A01屏幕无法显示

Open MasterYuan418 opened this issue 2 years ago • 5 comments

rt,圆形屏幕,使用framebuffer驱动,芯片GC9A01。 调用:font.text(LCD, '测试', x, y, show=True, color_type=1)失败,但屏幕绘制英文正常(使用LCD.write_text('Test',20,70,3,LCD.black)

打了log日志,log如下:

开始进行中文绘制 (在for char in range(len(string))前)
找到中文索引:5537
中文字体点阵数据获取成功 (在colorType优化前)
找到中文索引:10245
中文字体点阵数据获取成功
尝试进行屏幕显示 (在display.show前)

同时获得了font.text返回值,为None

屏幕厂家:微雪电子 Micropython版本:1.20 屏幕分辨率:240x240

MasterYuan418 avatar Jul 21 '23 06:07 MasterYuan418

是否是内存不足呢?失败的状况是什么样的

AntonVanke avatar Jul 24 '23 08:07 AntonVanke

是否是内存不足呢?失败的状况是什么样的

不是,就是单纯的无法显示在屏幕上(空白),我的开发板内存大小是264KB

MasterYuan418 avatar Jul 24 '23 08:07 MasterYuan418

额,可能是某些bug,你或许可以尝试使用color和bg_color来指定颜色,或许也是我没有考虑到的情况

AntonVanke avatar Jul 24 '23 08:07 AntonVanke

还是无法正常使用,我的测试代码是:

def write_chs(LCD, text, x, y):
    font = ufont.BMFont("./fs/unifont-14-12917-16.v3.bmf")  
    font.text(LCD, text, x, y, show=True, color=0)

LCD = LCD_1inch28()
LCD.write_text('Test',30,110,3,LCD.black) # 这个正常显示
write_chs(LCD, "测试", 30, 110) # 这个无法使用

MasterYuan418 avatar Jul 24 '23 08:07 MasterYuan418

等我找个GC9A01试试 🤣

AntonVanke avatar Jul 24 '23 08:07 AntonVanke