V7 and V8 in doc font setting example is :
lv_style_set_text_font(&my_style, LV_STATE_DEFAULT, &lv_font_montserrat_28); /Set a larger font/
but It’s actually in the V8 source code :
void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value
{
lv_style_value_t v = {
.ptr = value
};
lv_style_set_prop(style, LV_STYLE_TEXT_FONT, v);
}
yet V8
typedef struct {
/The bitmaps of all glyphs/
const uint8_t * glyph_bitmap;
/*Describe the glyphs*/
const lv_font_fmt_txt_glyph_dsc_t * glyph_dsc;
/*Map the glyphs to Unicode characters.
*Array of `lv_font_cmap_fmt_txt_t` variables*/
const lv_font_fmt_txt_cmap_t * cmaps;
/**
* Store kerning values.
* Can be `lv_font_fmt_txt_kern_pair_t * or `lv_font_kern_classes_fmt_txt_t *`
* depending on `kern_classes`
*/
const void * kern_dsc;
/*Scale kern values in 12.4 format*/
uint16_t kern_scale;
/*Number of cmap tables*/
uint16_t cmap_num : 9;
/*Bit per pixel: 1, 2, 3, 4, 8*/
uint16_t bpp : 4;
/*Type of `kern_dsc`*/
uint16_t kern_classes : 1;
/*
* storage format of the bitmap
* from `lv_font_fmt_txt_bitmap_format_t`
*/
uint16_t bitmap_format : 2;
/*Cache the last letter and is glyph id*/
lv_font_fmt_txt_glyph_cache_t * cache;
} lv_font_fmt_txt_dsc_t;
V6:
typedef struct {
/The bitmaps os all glyphs/
const uint8_t * glyph_bitmap;
/*Describe the glyphs*/
const lv_font_fmt_txt_glyph_dsc_t * glyph_dsc;
/* Map the glyphs to Unicode characters.
* Array of `lv_font_cmap_fmt_txt_t` variables*/
const lv_font_fmt_txt_cmap_t * cmaps;
/* Store kerning values.
* Can be `lv_font_fmt_txt_kern_pair_t * or `lv_font_kern_classes_fmt_txt_t *`
* depending on `kern_classes`
*/
const void * kern_dsc;
/*Scale kern values in 12.4 format*/
uint16_t kern_scale;
/*Number of cmap tables*/
uint16_t cmap_num :10;
/*Bit per pixel: 1, 2, 3, 4*/
uint16_t bpp :3;
/*Type of `kern_dsc`*/
uint16_t kern_classes :1;
/*
* storage format of the bitmap
* from `lv_font_fmt_txt_bitmap_format_t`
*/
uint16_t bitmap_format :2;
/*Cache the last letter and is glyph id*/
uint32_t last_letter;
uint32_t last_glyph_id;
}lv_font_fmt_txt_dsc_t;
The structure definition and function are different from before, the previous tool is not working, now how do I generate font and setting?