页次: 1
怎么将awesome的ttf文件在LVGL上转换?能说的详细点么?
夏雨夜寐 wrote:
你如果单单要使用awesome图标的话,我这里有个24*24的awesome的c文件
builtin_Symbol24P.zip,已转换好的当前awesome已有的图标
使用参考lvgl内部的图标宏
其实你也可以直接在awesome官网下了ttf文件,然后在lvgl转换
好的,谢谢。
最近发现老版本上 https://littlevgl.com/ttf-font-to-c-array-old 可以在线生成字体,但是新版本 https://littlevgl.com/ttf-font-to-c-array 上尝试生成字体,一直无法成功。。请问下有成功的么?
是这个。
晕哥 wrote:
cdft wrote:
如何生成 Fontawesome图标字体?
你说的是这个吗?
[原创开源]emwin导航界面支持Awesome图标字体: https://whycan.cn/t_2917.html
可以生成SYMBOL类型的图标么?
晕哥 wrote:
分享一个好用的 littlevgl 字体生成工具: https://whycan.cn/t_1350.html
在 https://littlevgl.com/ttf-font-to-c-array 地址生成字体,配置好各选项后点击“convert”会出现卡一会然后就刷新的页面,各参数都没有了,请问这是什么情况?
在 https://littlevgl.com/ttf-font-to-c-array 上想生成字体移植失败。
移植用老版本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;
页次: 1