Skip to content

Add extra fonts to lvgl does not work as expected #567

@ste7anste7an

Description

@ste7anste7an

Adding fonts

I made this change in `lvgl_micropython/lib/lv_conf.h':

/*Montserrat fonts with ASCII range and some symbols using bpp = 4
 *https://fonts.google.com/specimen/Montserrat*/
#define LV_FONT_MONTSERRAT_8  0
#define LV_FONT_MONTSERRAT_10 0
#define LV_FONT_MONTSERRAT_12 1
#define LV_FONT_MONTSERRAT_14 1
#define LV_FONT_MONTSERRAT_16 1
#define LV_FONT_MONTSERRAT_18 0
#define LV_FONT_MONTSERRAT_20 1
#define LV_FONT_MONTSERRAT_22 0
#define LV_FONT_MONTSERRAT_24 0
#define LV_FONT_MONTSERRAT_26 1
#define LV_FONT_MONTSERRAT_28 0
#define LV_FONT_MONTSERRAT_30 0
#define LV_FONT_MONTSERRAT_32 1
#define LV_FONT_MONTSERRAT_34 0
#define LV_FONT_MONTSERRAT_36 0
#define LV_FONT_MONTSERRAT_38 1
#define LV_FONT_MONTSERRAT_40 0
#define LV_FONT_MONTSERRAT_42 0
#define LV_FONT_MONTSERRAT_44 1
#define LV_FONT_MONTSERRAT_46 0
#define LV_FONT_MONTSERRAT_48 0

I comile the firmware resulting in lvgl_micropy_ESP32_GENERIC-4.bin

When I do: strings lvgl_micropy_ESP32_GENERIC-4.bin |grep font_montserrat I get:

font_montserrat_12
font_montserrat_14
font_montserrat_16
font_montserrat_20
font_montserrat_26
font_montserrat_32
font_montserrat_38
font_montserrat_44

But when I run this little program:

import lvgl
methods=dir(lvgl)
for m in methods:
    if m[:9]=='font_mont':
        print(m)

I only see:

font_montserrat_12
font_montserrat_14
font_montserrat_16
  • Make: ESP32
  • Model: ESP32-PICO-V3-02 (revision 3) wuth 2MByte of PSRAM, but I did not use PSRAM.

I need to know the OS and OS version of the machine that compiled the binary. If using a VM then I need to know the OS and OS version the VM is running. (WSL == VM)

  • OS: Ubuntu 22.04.3 LTS

Build Command

python3 make.py esp32 BOARD=ESP32_GENERIC DISPLAY=ili9341 DISPLAY=st7789 INDEV=xpt2046 INDEV=cst816s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions