移植用老版本littlevGL,移植成功后显示汉子成功;通过在线取模(https://littlevgl.com/ttf-font-to-c-array-old)。之前版本字体样式
lv_font_t chinese1_m1_font =
{
.unicode_first = 19968, /First Unicode letter in this font/
.unicode_last = 40959, /Last Unicode letter in this font/
.h_px = 25, /Font height in pixels/
.glyph_bitmap = chinese1_m1_font_glyph_bitmap, /Bitmap of glyphs/
.glyph_dsc = chinese1_m1_font_glyph_dsc, /Description of glyphs/
//.glyph_cnt = 18, /Number of glyphs in the font/
.unicode_list = chinese1_m1_font_unicode_list, /List of unicode characters/
.get_bitmap = lv_font_get_bitmap_sparse, /Function pointer to get glyph's bitmap/
.get_width = lv_font_get_width_sparse, /Function pointer to get glyph's width/
#if USE_CHINESE1_M1_FONT == 1
.bpp = 1, /Bit per pixel/
#elif USE_CHINESE1_M1_FONT == 2
.bpp = 2, /Bit per pixel/
#elif USE_CHINESE1_M1_FONT == 4
.bpp = 4, /Bit per pixel/
#elif USE_CHINESE1_M1_FONT == 8
.bpp = 8, /Bit per pixel/
#endif
//.monospace = 0, /Fix width (0: if not used)/
.next_page = NULL, /Pointer to a font extension/
};
移植最先版本littlevGL 6.0.0后,发现字体结构改变了,请教需要怎么修改?
typedef struct _lv_font_struct
{
/** Get a glyph's descriptor from a font*/
bool (get_glyph_dsc)(const struct _lv_font_struct , lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next);
/** Get a glyph's bitmap from a font*/
const uint8_t (get_glyph_bitmap)(const struct _lv_font_struct *, uint32_t);
/Pointer to the font in a font pack (must have the same line height)/
uint8_t line_height; /**< The real line height where any text fits*/
uint8_t base_line; /**< Base line measured from the top of the line_height*/
void dsc; /**< Store implementation specific data here/
#if LV_USE_USER_DATA
lv_font_user_data_t user_data; /**< Custom user data for font. */
#endif
} lv_font_t;
离线
在 https://littlevgl.com/ttf-font-to-c-array 上想生成字体移植失败。
离线
@cdft 这个问题后来解决了吗?
离线
@hengyongchao 没有解决
离线
重新去光网生成字体即可使用
离线
zwmasdf wrote:
重新去光网生成字体即可使用
请问是哪个地址呢
离线
超级萌新 wrote:
zwmasdf wrote:
重新去光网生成字体即可使用
请问是哪个地址呢
就是2楼的地址
离线
zwmasdf wrote:
超级萌新 wrote:
zwmasdf wrote:
重新去光网生成字体即可使用
请问是哪个地址呢
就是2楼的地址
可以么?
离线
分享一个好用的 littlevgl 字体生成工具. https://whycan.cn/t_1350.html
离线
学习下。。。
离线