Git Product home page Git Product logo

micropython-ufont's Introduction

ANTONVANKE

micropython-ufont's People

Contributors

antonvanke avatar wind-stormger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

micropython-ufont's Issues

GC9A01屏幕无法显示

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

不够优化啊

可以做3个优化:
1)将全部字体数据一次读取到内存里,然后在内存里用stream去查找
2)循环里去创建 framebuf.FrameBuffer(bytearray(byte_data), font_size, font_size, framebuf.MONO_HLSB)非常慢,将FrameBuffer和字体缓冲提取到对象属性里,避免每显示一个字符都创建一次FrameBuffer
3)然后在get_bitmap时直接readinto到FrameBuffer的缓冲区

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.