Skip to content

Commit 8c4fd0c

Browse files
committed
Rendering canvas
1 parent d584f43 commit 8c4fd0c

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,15 @@ Let's use the Zig Compiler to compile `lv_label.c` from C to WebAssembly....
474474

475475
- Add `-DLV_MEM_CUSTOM=1` (because we're using `malloc` instead of LVGL's TLSF Allocator)
476476

477+
- Set the Default Font to Montserrat 20...
478+
479+
```text
480+
-DLV_FONT_MONTSERRAT_14=1 \
481+
-DLV_FONT_MONTSERRAT_20=1 \
482+
-DLV_FONT_DEFAULT_MONTSERRAT_20=1 \
483+
-DLV_USE_FONT_PLACEHOLDER=1 \
484+
```
485+
477486
- Add `-DLV_USE_LOG=1` (to enable logging)
478487

479488
- Add `-DLV_LOG_LEVEL=LV_LOG_LEVEL_TRACE` (for detailed logging)
@@ -513,6 +522,10 @@ zig cc \
513522
-lc \
514523
-DFAR= \
515524
-DLV_MEM_CUSTOM=1 \
525+
-DLV_FONT_MONTSERRAT_14=1 \
526+
-DLV_FONT_MONTSERRAT_20=1 \
527+
-DLV_FONT_DEFAULT_MONTSERRAT_20=1 \
528+
-DLV_USE_FONT_PLACEHOLDER=1 \
516529
-DLV_USE_LOG=1 \
517530
-DLV_LOG_LEVEL=LV_LOG_LEVEL_TRACE \
518531
-DLV_LOG_TRACE_OBJ_CREATE=1 \
@@ -575,6 +588,10 @@ Let's ask Zig Compiler to link `lv_label.o` with our Zig LVGL App [`lvglwasm.zig
575588
-lc \
576589
-DFAR= \
577590
-DLV_MEM_CUSTOM=1 \
591+
-DLV_FONT_MONTSERRAT_14=1 \
592+
-DLV_FONT_MONTSERRAT_20=1 \
593+
-DLV_FONT_DEFAULT_MONTSERRAT_20=1 \
594+
-DLV_USE_FONT_PLACEHOLDER=1 \
578595
-DLV_USE_LOG=1 \
579596
-DLV_LOG_LEVEL=LV_LOG_LEVEL_TRACE \
580597
-DLV_LOG_TRACE_OBJ_CREATE=1 \

build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ function build_zig {
9292
-lc \
9393
-DFAR= \
9494
-DLV_MEM_CUSTOM=1 \
95+
-DLV_FONT_MONTSERRAT_14=1 \
96+
-DLV_FONT_MONTSERRAT_20=1 \
97+
-DLV_FONT_DEFAULT_MONTSERRAT_20=1 \
98+
-DLV_USE_FONT_PLACEHOLDER=1 \
9599
-DLV_USE_LOG=1 \
96100
-DLV_LOG_LEVEL=LV_LOG_LEVEL_TRACE \
97101
-DLV_LOG_TRACE_OBJ_CREATE=1 \
@@ -228,6 +232,10 @@ function compile_lvgl {
228232
-lc \
229233
-DFAR= \
230234
-DLV_MEM_CUSTOM=1 \
235+
-DLV_FONT_MONTSERRAT_14=1 \
236+
-DLV_FONT_MONTSERRAT_20=1 \
237+
-DLV_FONT_DEFAULT_MONTSERRAT_20=1 \
238+
-DLV_USE_FONT_PLACEHOLDER=1 \
231239
-DLV_USE_LOG=1 \
232240
-DLV_LOG_LEVEL=LV_LOG_LEVEL_TRACE \
233241
-DLV_LOG_TRACE_OBJ_CREATE=1 \

lvglwasm.wasm

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)