Просмотр исходного кода

update: luatfonts单独编译, 不然csky的编译器又无法链接

Wendal Chen 2 лет назад
Родитель
Сommit
0c854aa0fe
2 измененных файлов с 113 добавлено и 2 удалено
  1. 93 0
      app/port/luat_conf_bsp.h
  2. 20 2
      xmake.lua

+ 93 - 0
app/port/luat_conf_bsp.h

@@ -239,6 +239,99 @@
 #define LUAT_USE_LVGL_TILEVIEW   //平铺视图 依赖页面PAGE
 #define LUAT_USE_LVGL_WIN   //窗口 依赖容器CONT 按钮BTN 标签LABEL 图片IMG 页面PAGE
 
+// 新字体系列
+// #define LUAT_FONTS_SARASA_BOLD_M8_CHINESE
+// #define LUAT_FONTS_SARASA_BOLD_M10_CHINESE
+// #define LUAT_FONTS_SARASA_BOLD_M12_CHINESE
+// #define LUAT_FONTS_SARASA_BOLD_M14_CHINESE
+// #define LUAT_FONTS_SARASA_BOLD_M16_CHINESE
+// #define LUAT_FONTS_SARASA_BOLD_M18_CHINESE
+// #define LUAT_FONTS_SARASA_BOLD_M20_CHINESE
+// #define LUAT_FONTS_SARASA_BOLD_M22_CHINESE
+// #define LUAT_FONTS_SARASA_BOLD_M24_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M8_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M10_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M12_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M14_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M16_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M18_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M20_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M22_CHINESE
+// #define LUAT_FONTS_SARASA_LIGHT_M24_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M8_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M10_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M12_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M14_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M16_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M18_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M20_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M22_CHINESE
+// #define LUAT_FONTS_SARASA_REGULAR_M24_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M8_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M10_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M12_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M14_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M16_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M18_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M20_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M22_CHINESE
+// #define LUAT_FONTS_SARASA_SEMIBOLD_M24_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M8_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M10_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M12_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M14_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M16_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M18_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M20_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M22_CHINESE
+// #define LUAT_FONTS_SARASA_EXTRALIGHT_M24_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M8_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M10_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M12_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M14_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M16_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M18_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M20_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M22_CHINESE
+// #define LUAT_FONTS_OPPO_BOLD_M24_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M8_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M10_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M12_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M14_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M16_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M18_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M20_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M22_CHINESE
+// #define LUAT_FONTS_OPPO_HEAVY_M24_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M8_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M10_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M12_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M14_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M16_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M18_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M20_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M22_CHINESE
+// #define LUAT_FONTS_OPPO_LIGHT_M24_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M8_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M10_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M12_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M14_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M16_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M18_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M20_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M22_CHINESE
+// #define LUAT_FONTS_OPPO_MEDIUM_M24_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M8_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M10_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M12_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M14_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M16_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M18_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M20_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M22_CHINESE
+// #define LUAT_FONTS_OPPO_REGULAR_M24_CHINESE
+
+
 //-------------------------------------------------------------------------------
 //<-- custom
 //------------------------------------------------------------------------------

+ 20 - 2
xmake.lua

@@ -400,6 +400,25 @@ target("nes")
     add_files(luatos.."components/nes/**.c")
 target_end()
 
+target("luatfonts")
+    set_kind("static")
+    set_plat("cross")
+    set_arch("c-sky")
+
+    add_files(luatos.."components/luatfonts/**.c")
+    add_includedirs(luatos.."components/luatfonts")
+
+    add_includedirs("app/port",{public = true})
+    add_includedirs("include",{public = true})
+    add_includedirs(luatos.."lua/include",{public = true})
+    add_includedirs(luatos.."luat/include",{public = true})
+    add_includedirs(luatos.."components/u8g2",{public = true})
+    add_includedirs(luatos.."components/gtfont")
+    add_includedirs(luatos.."components/qrcode",{public = true})
+
+    set_targetdir("$(buildir)/lib")
+target_end()
+
 target("air10x")
     -- set kind
     set_kind("binary")
@@ -475,6 +494,7 @@ target("air10x")
     -- add_deps("opus131")
     add_deps("nes")
     add_deps("audio")
+    add_deps("luatfonts")
     -- add files
     add_files("app/*.c")
     add_files("app/port/*.c")
@@ -541,8 +561,6 @@ target("air10x")
     add_includedirs(luatos.."components/gtfont")
     add_files(luatos.."components/gtfont/*.c")
 
-    add_files(luatos.."components/luatfonts/*.c")
-    add_includedirs(luatos.."components/luatfonts")
     add_includedirs(luatos.."components/lvgl/src/lv_font",{public = true})
 
     add_files(luatos.."components/zlib/*.c")