Using Chinese fonts with an ST7789 display

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
tusabez
Posts: 9
Joined: Sun Jul 25, 2021 10:00 am

Using Chinese fonts with an ST7789 display

Post by tusabez » Thu Oct 21, 2021 10:42 am

Hi all,

I'm interested in getting Chinese characters to display on an st7789 display but haven't I figured out how to do it yet. I have no problem printing out text in English. I'm using the following drivers with the Pico [/url]https://github.com/russhughes/st7789py_mpy[url]. I'm assuming either I need to download a font file or need to make my own but I'm not that advanced yet.

Thanks

User avatar
russ_h
Posts: 88
Joined: Thu Oct 03, 2019 2:26 am
Contact:

Re: Using Chinese fonts with an ST7789 display

Post by russ_h » Fri Oct 22, 2021 6:29 pm

You can convert a True Type font using the font2bitmap.py utility. The display driver is not currently unicode aware so it would require some modifications to make unicode fonts work easily. I will look into adding support for unicode fonts.

User avatar
russ_h
Posts: 88
Joined: Thu Oct 03, 2019 2:26 am
Contact:

Re: Using Chinese fonts with an ST7789 display

Post by russ_h » Sun Oct 24, 2021 5:53 pm

The write method now accepts UTF8 encoded strings. You will have to create a python font file containing the characters you are going to use with the font2bitmap.py utility. See the proverbs.py and proverbs_font.py files in the examples/T-Display folder for an example. UTF8 support is not optimized, but it is usable.

Image

tusabez
Posts: 9
Joined: Sun Jul 25, 2021 10:00 am

Re: Using Chinese fonts with an ST7789 display

Post by tusabez » Sun Oct 24, 2021 7:29 pm

Thank you! I will take a look and give it a try.

Post Reply