lvgl / lv_font_conv

Converts TTF/WOFF fonts to compact bitmap format
https://lvgl.io/tools/fontconverter
MIT License
176 stars 77 forks source link

Online font converter header issue with V9 #116

Closed Superberti closed 3 weeks ago

Superberti commented 6 months ago

LVGL version

V9.0.0

What happened?

The online font converter tool has a small glitch when using it with V9. If you try to include the fonts in your project you may get an header include error. But it's easy to fix:

The header include macros from the converter tool

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
    #include "lvgl.h"
#else
    #include "../../lvgl.h"
#endif

should be replaced with:

#ifdef __has_include
    #if __has_include("lvgl.h")
        #ifndef LV_LVGL_H_INCLUDE_SIMPLE
            #define LV_LVGL_H_INCLUDE_SIMPLE
        #endif
    #endif
#endif

#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
    #include "lvgl.h"
#else
    #include "lvgl/lvgl.h"
#endif

How to reproduce?

No response

kisvegabor commented 6 months ago

We are really using this structure on other places too. A pull request would be very welcome.

lvgl-bot commented 6 months ago

We need some feedback on this issue.

Now we mark this as "stale" because there was no activity here for 14 days.

Remove the "stale" label or comment else this will be closed in 7 days.

kisvegabor commented 3 months ago

Transferred to the font converter's repo.

ev0rtex commented 4 weeks ago

I am just using this for the first time and ran into the same thing today... submitted a PR that fixes it