mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 03:58:33 +08:00
improve default font handling
This commit is contained in:
parent
0b79f75209
commit
3f5e3623b2
@ -44,4 +44,8 @@ ret_t application_exit() {
|
||||
#define LCD_HEGHT 600
|
||||
#define APP_TYPE APP_DESKTOP
|
||||
|
||||
#ifdef WITH_FS_RES
|
||||
#define APP_DEFAULT_FONT "default_full"
|
||||
#endif/*WITH_FS_RES*/
|
||||
|
||||
#include "awtk_main.inc"
|
||||
|
@ -106,4 +106,8 @@ ret_t application_exit() {
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
#ifdef WITH_FS_RES
|
||||
#define APP_DEFAULT_FONT "default_full"
|
||||
#endif/*WITH_FS_RES*/
|
||||
|
||||
#include "awtk_main.inc"
|
||||
|
@ -862,4 +862,8 @@ ret_t application_exit() {
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
#ifdef WITH_FS_RES
|
||||
#define APP_DEFAULT_FONT "default_full"
|
||||
#endif/*WITH_FS_RES*/
|
||||
|
||||
#include "awtk_main.inc"
|
||||
|
@ -1,6 +1,7 @@
|
||||
# 最新动态
|
||||
* 2020/05/22
|
||||
* 修改 list item 快速点击无效的问题(感谢 yeslee 提供补丁)
|
||||
* 完善缺省字体处理(感谢俊杰提供补丁)
|
||||
|
||||
* 2020/05/21
|
||||
* 增加文档《自定义控件规范》
|
||||
|
@ -26,11 +26,7 @@ extern ret_t assets_init(void);
|
||||
END_C_DECLS
|
||||
|
||||
#ifndef APP_DEFAULT_FONT
|
||||
#ifdef WITH_FS_RES
|
||||
#define APP_DEFAULT_FONT "default_full"
|
||||
#else
|
||||
#define APP_DEFAULT_FONT "default"
|
||||
#endif /*WITH_FS_RES*/
|
||||
#endif /*APP_DEFAULT_FONT*/
|
||||
|
||||
#ifndef LCD_WIDTH
|
||||
|
@ -152,7 +152,7 @@ font_t* font_manager_get_font(font_manager_t* fm, const char* name, font_size_t
|
||||
}
|
||||
}
|
||||
|
||||
if (font == NULL) {
|
||||
if (font == NULL && fm->fonts.size > 0) {
|
||||
font_t** fonts = (font_t**)fm->fonts.elms;
|
||||
font = fonts[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user