gdisp: Fix font encoder configuration

This commit is contained in:
Joel Bodenmann 2024-09-18 04:41:17 +02:00
parent b48d18c4f9
commit ba776e85fe
2 changed files with 18 additions and 0 deletions

View File

@ -43,8 +43,17 @@
#define MF_USE_KERNING GDISP_NEED_TEXT_KERNING #define MF_USE_KERNING GDISP_NEED_TEXT_KERNING
#define MF_FONT_FILE_NAME "src/gdisp/fonts/fonts.h" #define MF_FONT_FILE_NAME "src/gdisp/fonts/fonts.h"
#ifdef __AVR__
#include <avr/pgmspace.h>
#elif defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
#include <pgmspace.h>
#else
#include <stdint.h>
#define PROGMEM
#define pgm_read_byte(addr) (*(const unsigned char *)(addr)) #define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#define pgm_read_word(addr) (*(const uint16_t *)(addr)) #define pgm_read_word(addr) (*(const uint16_t *)(addr))
#endif /* __AVR__ */
/******************************************************* /*******************************************************

View File

@ -7,7 +7,16 @@
#ifndef MF_NO_COMPILE #ifndef MF_NO_COMPILE
#define MF_BWFONT_INTERNALS
#define MF_RLEFONT_INTERNALS
#include "mf_font.h" #include "mf_font.h"
#include "mf_bwfont.h"
#include "mf_rlefont.h"
#include "mf_bwfont.h"
#include "mf_scaledfont.h"
#include <stdbool.h> #include <stdbool.h>
/* This will be made into a list of included fonts using macro magic. */ /* This will be made into a list of included fonts using macro magic. */