Update fonts files to allow compiling without GDISP_NEED_TEXT.
This commit is contained in:
parent
b53ab7adf4
commit
4394266679
9 changed files with 44 additions and 1 deletions
|
@ -6,6 +6,9 @@
|
|||
*/
|
||||
|
||||
#include "mf_bwfont.h"
|
||||
|
||||
#ifndef MF_NO_COMPILE
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/* Find the character range and index that contains a given glyph.. */
|
||||
|
@ -139,3 +142,5 @@ uint8_t mf_bwfont_character_width(const struct mf_font_s *font,
|
|||
|
||||
return get_width(range, index);
|
||||
}
|
||||
|
||||
#endif //MF_NO_COMPILE
|
||||
|
|
|
@ -10,8 +10,16 @@
|
|||
#ifndef _MF_CONFIG_H_
|
||||
#define _MF_CONFIG_H_
|
||||
|
||||
/*******************************************************
|
||||
* Configuration settings related to GFX *
|
||||
*******************************************************/
|
||||
|
||||
#include <gfx.h>
|
||||
|
||||
#if !GFX_USE_GDISP || !GDISP_NEED_TEXT
|
||||
#define MF_NO_COMPILE // Don't compile any font code
|
||||
#endif
|
||||
|
||||
/* Prevent double definitions of standard int types */
|
||||
#define MF_NO_STDINT_H
|
||||
|
||||
|
@ -29,7 +37,6 @@
|
|||
#define MF_USE_ADVANCED_WORDWRAP 0
|
||||
#define MF_USE_JUSTIFY 0
|
||||
|
||||
|
||||
/*******************************************************
|
||||
* Configuration settings related to build environment *
|
||||
*******************************************************/
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "mf_encoding.h"
|
||||
|
||||
#ifndef MF_NO_COMPILE
|
||||
|
||||
#if MF_ENCODING == MF_ENCODING_UTF8
|
||||
|
||||
mf_char mf_getchar(mf_str *str)
|
||||
|
@ -89,3 +91,6 @@ void mf_rewind(mf_str *str)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif //MF_NO_COMPILE
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
*/
|
||||
|
||||
#include "mf_font.h"
|
||||
|
||||
#ifndef MF_NO_COMPILE
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
/* This will be made into a list of included fonts using macro magic. */
|
||||
|
@ -82,3 +85,5 @@ const struct mf_font_list_s *mf_get_font_list()
|
|||
return MF_INCLUDED_FONTS;
|
||||
}
|
||||
|
||||
#endif //MF_NO_COMPILE
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include "mf_justify.h"
|
||||
#include "mf_kerning.h"
|
||||
|
||||
#ifndef MF_NO_COMPILE
|
||||
|
||||
#if MF_USE_TABS
|
||||
/* Round the X coordinate up to the nearest tab stop. */
|
||||
static int16_t mf_round_to_tab(const struct mf_font_s *font,
|
||||
|
@ -338,3 +340,6 @@ void mf_render_justified(const struct mf_font_s *font,
|
|||
|
||||
#endif
|
||||
|
||||
#endif //MF_NO_COMPILE
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
*/
|
||||
|
||||
#include "mf_kerning.h"
|
||||
|
||||
#ifndef MF_NO_COMPILE
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#if MF_USE_KERNING
|
||||
|
@ -123,3 +126,5 @@ int8_t mf_compute_kerning(const struct mf_font_s *font,
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif //MF_NO_COMPILE
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "mf_rlefont.h"
|
||||
|
||||
#ifndef MF_NO_COMPILE
|
||||
|
||||
/* Number of reserved codes before the dictionary entries. */
|
||||
#define DICT_START 24
|
||||
|
||||
|
@ -288,3 +290,5 @@ uint8_t mf_rlefont_character_width(const struct mf_font_s *font,
|
|||
|
||||
return *p;
|
||||
}
|
||||
|
||||
#endif //MF_NO_COMPILE
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "mf_scaledfont.h"
|
||||
|
||||
#ifndef MF_NO_COMPILE
|
||||
|
||||
struct scaled_renderstate
|
||||
{
|
||||
mf_pixel_callback_t orig_callback;
|
||||
|
@ -88,3 +90,4 @@ void mf_scale_font(struct mf_scaledfont_s *newfont,
|
|||
newfont->y_scale = y_scale;
|
||||
}
|
||||
|
||||
#endif //MF_NO_COMPILE
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include "mf_wordwrap.h"
|
||||
|
||||
#ifndef MF_NO_COMPILE
|
||||
|
||||
/* Returns true if the line can be broken at this character. */
|
||||
static bool is_wrap_space(uint16_t c)
|
||||
{
|
||||
|
@ -294,3 +296,5 @@ void mf_wordwrap(const struct mf_font_s *font, int16_t width,
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif //MF_NO_COMPILE
|
||||
|
|
Loading…
Add table
Reference in a new issue