Skip to content

Commit cc204ea

Browse files
committed
fix: make fontconfig work again
1 parent 8f205ec commit cc204ea

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/lcui_fonts.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static void lcui_fc_fonts_init(void)
6262

6363
for (i = 0; i < sizeof(fonts) / sizeof(char *); ++i) {
6464
path = pd_font_library_get_font_path(fonts[i]);
65-
id = pd_font_library_load_file(path);
65+
pd_font_library_load_file(path);
6666
free(path);
6767
// TODO: 使用系统已设置的默认字体
6868
if (!has_default) {

xmake.lua

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ target("lcui")
7979
elseif is_plat("windows") then
8080
add_defines("LCUI_DLL_EXPORT")
8181
end
82+
if has_package("fontconfig") then
83+
add_defines("HAVE_FONTCONFIG")
84+
end
8285
add_configfiles("src/config.h.in")
8386
set_configdir("include/LCUI")
8487
add_deps(

0 commit comments

Comments
 (0)