antonvanke / micropython-ufont Goto Github PK
View Code? Open in Web Editor NEWMicroPython 的中文字库,使 MicroPython 能够显示中文
License: MIT License
MicroPython 的中文字库,使 MicroPython 能够显示中文
License: MIT License
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
能不能出一个ILI9341的驱动,或者如何制作驱动,有没有教程?
可以做3个优化:
1)将全部字体数据一次读取到内存里,然后在内存里用stream去查找
2)循环里去创建 framebuf.FrameBuffer(bytearray(byte_data), font_size, font_size, framebuf.MONO_HLSB)非常慢,将FrameBuffer和字体缓冲提取到对象属性里,避免每显示一个字符都创建一次FrameBuffer
3)然后在get_bitmap时直接readinto到FrameBuffer的缓冲区
现在不需要专门写这个了,framebuf的blit自带调色板参数和透明
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.