Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gslc_FontSet fail to add vlw font file from SPIFFTS #556

Open
JoeHo8051 opened this issue Nov 28, 2024 · 2 comments
Open

gslc_FontSet fail to add vlw font file from SPIFFTS #556

JoeHo8051 opened this issue Nov 28, 2024 · 2 comments

Comments

@JoeHo8051
Copy link

Describe the bug

I put my vlw file into spiffs, and I check the file do exist in the SPIFFS area.
It seems it failed to load the font , I saw the serial return "Font file cairomedium16.vlw not found! " when I enter the page using that font.

Here is my code:

if (!gslc_Init(&m_gui,&m_drv,m_asPage,MAX_PAGE,m_asFont,MAX_FONT)) { return; }

if (!SPIFFS.begin(true)) {
return;
}

// ------------------------------------------------
// Load Fonts
// ------------------------------------------------
//<Load_Fonts !Start!>
if (!gslc_FontSet(&m_gui,E_BUILTIN10X16,GSLC_FONTREF_PTR,NULL,2)) { return; }
if (!gslc_FontSet(&m_gui,E_BUILTIN15X24,GSLC_FONTREF_PTR,NULL,3)) { return; }
if (!gslc_FontSet(&m_gui,E_BUILTIN5X8,GSLC_FONTREF_PTR,NULL,1)) { return; }
if (!gslc_FontSet(&m_gui,E_CAIROBOLD16,GSLC_FONTREF_FNAME,CAIROBOLD16_VLW,16)) { return; }
gslc_FontSetMode(&m_gui, E_CAIROBOLD16, GSLC_FONTREF_MODE_1);

if (!gslc_FontSet(&m_gui,E_CAIROMEDIUM16,GSLC_FONTREF_FNAME,"cairomedium16.vlw",16)) { return; }

Device hardware

  • MCU: ESP32
  • Display with link: ili9488
  • GUIslice config selected: GUIslice_config.h: uncomment #include "../configs/esp-tftespi-default-xpt2046.h"
@Pconti31
Copy link
Contributor

@JoeHo8051 Post a zip file of a test project with just one text field using your font and include the full project folder with data folder and your cairomedium16.vlw
and I will take a look.
Also, If you used the builder then include your modified GUIsliceBuilder/templates/builder_fonts.json
Paul--

@Pconti31
Copy link
Contributor

@JoeHo8051 By the way here is a simple stand alone program without GUIslice or TFT_eSPI to list spiffs file names to serial output.
list_files.zip
Paul--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants