add lv_font_subpx_t

This commit is contained in:
Gabor Kiss-Vamosi
2019-10-16 10:34:54 +02:00
parent 7f7abe9a93
commit 10b3463a5f

View File

@@ -53,7 +53,18 @@ typedef struct
uint8_t bpp; /**< Bit-per-pixel: 1, 2, 4, 8*/
}lv_font_glyph_dsc_t;
/*Describe the properties of a font*/
/** The bitmaps might be upscaled by 3 to achieve subpixel rendering. */
enum {
LV_FONT_SUBPX_NONE,
LV_FONT_SUBPX_HOR,
LV_FONT_SUBPX_VER,
LV_FONT_SUBPX_BOTH,
};
typedef uint8_t lv_font_subpx_t;
/** Describe the properties of a font*/
typedef struct _lv_font_struct
{
/** Get a glyph's descriptor from a font*/
@@ -69,6 +80,9 @@ typedef struct _lv_font_struct
#if LV_USE_USER_DATA
lv_font_user_data_t user_data; /**< Custom user data for font. */
#endif
uint32_t subpx :2; /**< An element of `lv_font_subpx_t`*/
} lv_font_t;
/**********************