糞でっけーフォントの削除

諏訪子 <suwako@076.moe>、2026-06-26 09:08
コミット ac8090de8aa3da0481b6ce49a52318f650923a59 ・親 dea5906 ・ファイルを見る

3個のファイル、+31 -2

@@ -2,6 +2,32 @@
22
33 project(shaderplayground LANGUAGES CXX VERSION 0.1.0)
44
5+set(NOTOCJK_BINARY "${CMAKE_CURRENT_SOURCE_DIR}/ass/NotoSansCJKjp-Regular.otf")
6+set(NOTOCJK_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/ass/NotoSansCJKjp-Regular.h")
7+
8+add_custom_command(
9+ OUTPUT "${NOTOCJK_HEADER}"
10+ COMMAND xxd -i -n __NotoSansCJKjp_Regular_otf "${NOTOCJK_BINARY}" > "${NOTOCJK_HEADER}"
11+ DEPENDS "${NOTOCJK_BINARY}"
12+ COMMENT "NotoSansCJKjp-Regular.hを作成中・・・"
13+ VERBATIM
14+)
15+
16+set(NOTOMONO_BINARY "${CMAKE_CURRENT_SOURCE_DIR}/ass/NotoMono-Regular.ttf")
17+set(NOTOMONO_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/ass/NotoMono-Regular.h")
18+
19+add_custom_command(
20+ OUTPUT "${NOTOMONO_HEADER}"
21+ COMMAND xxd -i -n __NotoMono_Regular_ttf "${NOTOMONO_BINARY}" > "${NOTOMONO_HEADER}"
22+ DEPENDS "${NOTOMONO_BINARY}"
23+ COMMENT "NotoMono-Regular.hを作成中・・・"
24+ VERBATIM
25+)
26+
27+add_custom_target(generate_fonts
28+ DEPENDS "${NOTOCJK_HEADER}" "${NOTOMONO_HEADER}"
29+)
30+
531 if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
632 set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "デバッグ又はリリース" FORCE)
733 endif()
@@ -42,6 +68,7 @@
4268 file(GLOB_RECURSE SHADERPLAYGROUND_INC CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.hh")
4369
4470 add_executable(shaderplayground main.cc ${SHADERPLAYGROUND_SRC} ${SHADERPLAYGROUND_INC})
71+add_dependencies(shaderplayground generate_fonts)
4572 set_target_properties(shaderplayground PROPERTIES CXX_STANDARD 20)
4673
4774 set(PLATFORM_LIBS "")
@@ -174,6 +201,7 @@
174201
175202 target_include_directories(shaderplayground PRIVATE
176203 "${CMAKE_CURRENT_SOURCE_DIR}/include"
204+ "${CMAKE_CURRENT_SOURCE_DIR}/ass"
177205 )
178206
179207 if(MSVC)
@@ -0,0 +1,1 @@
1+*.h
@@ -36,8 +36,8 @@
3636 */
3737 #include <gui/guiengine.hh>
3838 #include <util/glfwpp.hh>
39-#include "../../ass/NotoSansCJKjp-Regular.h"
40-#include "../../ass/NotoMono-Regular.h"
39+#include <NotoSansCJKjp-Regular.h>
40+#include <NotoMono-Regular.h>
4141
4242 namespace gui {
4343 GuiEngine::GuiEngine(glfwpp::Window *window) {