generated from teedoc/teedoc.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6354672
commit c0fd00e
Showing
10 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
docs/Centi_S3_doc/en/MicroPython/Display_multiple_vector_fonts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## Display multiple vector fonts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
docs/Centi_S3_doc/zh/MicroPython/Display_multiple_vector_fonts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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空间。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters