Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Wind-stormger committed Sep 13, 2023
1 parent 6354672 commit c0fd00e
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Display multiple vector fonts

4 changes: 4 additions & 0 deletions docs/Centi_S3_doc/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,7 @@ Support both USB and external 3.7V lithium battery power input. With the board's
| EC_A Rotary Encoder | GPIO37 |
| EC_B Rotary Encoder | GPIO47 |
| WS2812B-2020 | GPIO48 |

### Buy it

[Aliexpress](https://www.aliexpress.com/item/1005005510964130.html)
2 changes: 2 additions & 0 deletions docs/Centi_S3_doc/en/sidebar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ items:
file: MicroPython/Make_semi-transparent_rectangular_text_box.md
- label: Refresh textbox on jpg
file: MicroPython/Refres_textbox_on_jpg.md
- label: Display multiple vector fonts
file: MicroPython/Display_multiple_vector_fonts.md
- label: 3. Code with Arduino
items:
- label: Install and configure the environment
Expand Down
20 changes: 20 additions & 0 deletions docs/Centi_S3_doc/zh/MicroPython/Display_multiple_vector_fonts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 显示多种矢量字体

### draw 方法

`draw(vector_font, s, x, y {, fg, scale, alpha})`

绘制 s 文本到显示器,使用指定的Hershey矢量字体,坐标为文本的左下角。文本的前景色可以由可选参数fg设置,默认前景色为白色。文本的大小可以通过指定scale比例值进行缩放。scale必须大于0,可以是浮点数或整数值。scale默认为1.0。alpha透明度默认为255。

### draw_len 方法

`draw_len(vector_font, s {, scale})`

返回使用指定字体绘制的 s 字符串在像素中的宽度。

### 下载矢量字体库

[GitHub:russhughes/st7789s3_esp_lcd/fonts/vector]仓库中有py文件格式的矢量字体库(https://github.com/russhughes/st7789s3_esp_lcd/tree/main/fonts/vector),在README中有所有字体的图样。

[例程的lib](https://github.com/BPI-STEAM/BPI-Centi-S3-Doc/tree/main/micropython_example/07_display_multiple_vector_fonts/lib)中则还能下载到已转化为mpy文件格式的矢量字体库,占用更少的flash空间。

2 changes: 2 additions & 0 deletions docs/Centi_S3_doc/zh/sidebar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ items:
file: MicroPython/Make_semi-transparent_rectangular_text_box.md
- label: 在JPG上刷新文本框
file: MicroPython/Refres_textbox_on_jpg.md
- label: 显示多种矢量字体
file: MicroPython/Display_multiple_vector_fonts.md
- label: 三、使用 Arduino 快速上手
items:
- label: 安装与配置环境
Expand Down
2 changes: 1 addition & 1 deletion docs/Leaf_S3_doc/en/MicroPython/Firmware.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Micropython firmware download and burning

The firmware supporting ESP32S3 chip can be found on [MicroPython official website](https://micropython.org/) https://micropython.org/download/GENERIC_S3/
The firmware supporting ESP32S3 chip can be found on [MicroPython official website](https://micropython.org/) https://micropython.org/download/ESP32_GENERIC_S3/

After clicking the link to enter the page, you can see several firmware download addresses below, select a file with a .bin suffix and download it locally.

Expand Down
2 changes: 1 addition & 1 deletion docs/Leaf_S3_doc/zh/MicroPython/Firmware.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Micropython 固件下载与烧录

[MicroPython官网](https://micropython.org/)可以找到支持ESP32S3芯片的固件 https://micropython.org/download/GENERIC_S3/
[MicroPython官网](https://micropython.org/)可以找到支持ESP32S3芯片的固件 https://micropython.org/download/ESP32_GENERIC_S3/

点击连接进入页面后即可在下方看到几个固件的下载地址,选择一个.bin 后缀的文件下载到本地即可。

Expand Down
2 changes: 1 addition & 1 deletion docs/Leaf_S3_doc/zh_tw/MicroPython/Firmware.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Micropython 固件下載與燒錄

[MicroPython官網](https://micropython.org/)可以找到支持ESP32S3芯片的固件 https://micropython.org/download/GENERIC_S3/
[MicroPython官網](https://micropython.org/)可以找到支持ESP32S3芯片的固件 https://micropython.org/download/ESP32_GENERIC_S3/

點擊連接進入頁面後即可在下方看到幾個固件的下載地址,選擇一個.bin 後綴的文件下載到本地即可。

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## 安装MicroPython.bin固件
> 所有对flash的操作不可逆,注意提前备份代码等重要文件。
### 下载tinyUF2固件
1. 点击此链接:[ESP32S3 SPIRAM micropython固件下载地址](https://micropython.org/download/GENERIC_S3_SPIRAM/)
1. 点击此链接:[ESP32S3 micropython固件下载地址](https://micropython.org/download/ESP32_GENERIC_S3/)
2. 找到下方 Firmware > Nightly builds,下载第一项,最新的,后缀名为 `.bin`的固件。
![](../assets/images/micropython_downlord_bin.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> 出厂已安装 tinyUF2 + CircuitPython固件,安装micropython UF2固件 仅需双击复位键进入UF2 bootloader模式,无需擦除flash。
> 本方法适用于已具备tinyUF2固件的开发板,如果开发板的flash被擦除或出现无法进入UF2 bootloader模式的故障,则需先参考[烧录tinyUF2固件的方法](../CircuitPython/flash_tinyuf2.md)
1. 点击此链接:[ESP32S3 SPIRAM micropython固件下载地址](https://micropython.org/download/GENERIC_S3_SPIRAM/)
1. 点击此链接:[ESP32S3 micropython固件下载地址](https://micropython.org/download/ESP32_GENERIC_S3/)
2. 找到下方 Firmware > Nightly builds,下载第一项,最新的,后缀名为 `.uf2`的固件。
![](../assets/images/micropython_downlord_uf2.png)
3. 使用一根具有供电与数据功能的microUSB线连接开发板与你的计算机。在文件管理页面将出现一个名为`CIRCUITPY`的磁盘,此为CircuitPython模式下的磁盘,通过双击开发板上的`Reset`按键的方式,使其变更为UF2模式下的磁盘,以下为具体操作步骤。
Expand Down

0 comments on commit c0fd00e

Please sign in to comment.