improve src/awtk_main.inc add APP_USE_STD_FONT_SIZE

This commit is contained in:
lixianjing 2024-10-31 17:11:28 +08:00
parent a0faa78bd5
commit 9496705151
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,8 @@
# 最新动态 # 最新动态
2024/11/31
* 使用APP_USE_STD_FONT_SIZE控制是否启用标准字体大小(感谢培煌提供补丁)
2024/11/30 2024/11/30
* 完善opengl_init * 完善opengl_init
* 增加 x4 图片并更新脚本 * 增加 x4 图片并更新脚本

View File

@ -65,6 +65,10 @@ END_C_DECLS
#define APP_ENABLE_CONSOLE TRUE #define APP_ENABLE_CONSOLE TRUE
#endif /*APP_ENABLE_CONSOLE*/ #endif /*APP_ENABLE_CONSOLE*/
#ifndef APP_USE_STD_FONT_SIZE
#define APP_USE_STD_FONT_SIZE FALSE
#endif /*APP_USE_STD_FONT_SIZE*/
#include "base/custom_keys.inc" #include "base/custom_keys.inc"
#include "base/asset_loader_zip.h" #include "base/asset_loader_zip.h"
@ -219,6 +223,7 @@ int main(int argc, char* argv[]) {
#endif #endif
#endif/*TK_IS_PC*/ #endif/*TK_IS_PC*/
font_manager_set_standard_font_size(font_manager(), APP_USE_STD_FONT_SIZE);
system_info_set_default_font(system_info(), APP_DEFAULT_FONT); system_info_set_default_font(system_info(), APP_DEFAULT_FONT);
assets_init(); assets_init();
#ifndef WITH_FS_RES #ifndef WITH_FS_RES