furnace/res/make-iconfont.sh

12 lines
547 B
Bash
Raw Permalink Normal View History

2023-08-15 00:19:18 +00:00
#!/bin/bash
# run after exporting to .ttf
2023-08-15 01:02:10 +00:00
# make sure you're running this on a Linux or Unix-like system with GCC
2023-08-15 00:19:18 +00:00
if [ ! -e binary_to_compressed_c ]; then
g++ -o binary_to_compressed_c ../extern/imgui_patched/misc/fonts/binary_to_compressed_c.cpp || exit 1
fi
2023-08-15 01:02:10 +00:00
echo "#include \"fonts.h\"" > ../src/gui/font_furicon.cpp
./binary_to_compressed_c icons.ttf furIcons | sed "s/static //" >> ../src/gui/font_furicon.cpp
2023-08-15 00:19:18 +00:00
#xxd -i -n "furIcons" icons.ttf | sed -r "s/^ +//g;s/, /,/g;s/ = /=/g;s/unsigned/const unsigned/g" > ../src/gui/font_furIcons.cpp