|
|
|
@ -37,16 +37,13 @@ EXEC_BDF2U8G=`which bdf2u8g`
|
|
|
|
|
echo "0 set EXEC_BDF2U8G=$EXEC_BDF2U8G"
|
|
|
|
|
if [ ! -x "${EXEC_BDF2U8G}" ]; then
|
|
|
|
|
EXEC_BDF2U8G="${DN_EXEC}/bdf2u8g"
|
|
|
|
|
echo "1 set EXEC_BDF2U8G=$EXEC_BDF2U8G"
|
|
|
|
|
fi
|
|
|
|
|
if [ ! -x "${EXEC_BDF2U8G}" ]; then
|
|
|
|
|
EXEC_BDF2U8G="${PWD}/bdf2u8g"
|
|
|
|
|
echo "2 set EXEC_BDF2U8G=$EXEC_BDF2U8G"
|
|
|
|
|
fi
|
|
|
|
|
if [ ! -x "${EXEC_BDF2U8G}" ]; then
|
|
|
|
|
echo "Not found bdf2u8g!"
|
|
|
|
|
echo "plaese compile u8blib/tools/font/bdf2u8g/bdf2u8g and link to it from here!"
|
|
|
|
|
|
|
|
|
|
echo "ERR: Not found bdf2u8g!" >&2
|
|
|
|
|
echo "plaese compile u8blib/tools/font/bdf2u8g/bdf2u8g and link to it from here!" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
@ -59,17 +56,55 @@ DN_WORK=./tmp1
|
|
|
|
|
|
|
|
|
|
(cd ${DN_EXEC}; gcc -o genpages genpages.c getline.c)
|
|
|
|
|
|
|
|
|
|
LANGS="an bg ca zh_CN zh_TW cz da de el el-gr en es eu fi fr gl hr it jp-kana nl pl pt pt-br ru sk tr uk test"
|
|
|
|
|
LANGS_DEFAULT="an bg ca zh_CN zh_TW cz da de el el-gr en es eu fi fr gl hr it jp-kana nl pl pt pt-br ru sk tr uk test"
|
|
|
|
|
|
|
|
|
|
for LANG in ${MARLIN_LANGS:=$LANGS_DEFAULT} ; do
|
|
|
|
|
echo "INFO: generate Marlin language data for '${LANG}'" >&2
|
|
|
|
|
|
|
|
|
|
for LANG in ${LANGS} ; do
|
|
|
|
|
rm -rf ${DN_WORK}/
|
|
|
|
|
mkdir -p ${DN_WORK}
|
|
|
|
|
cp Configuration.h ${DN_WORK}/
|
|
|
|
|
cp src/lcd/language/language_${LANG}.h ${DN_WORK}/
|
|
|
|
|
cd ${DN_WORK}/
|
|
|
|
|
${EXEC_WXGGEN} "${FN_NEWFONT}"
|
|
|
|
|
sed -e 's|fonts//|fonts/|g' -e 's|fonts//|fonts/|g' -e 's|[/0-9a-zA-Z_\-]*buildroot/share/fonts|buildroot/share/fonts|' -i fontutf8-data.h
|
|
|
|
|
cd ../
|
|
|
|
|
mv ${DN_WORK}/fontutf8-data.h src/lcd/dogm/language_data_${LANG}.h
|
|
|
|
|
rm -rf ${DN_WORK}/
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# generate default ASCII font (char range 0-255):
|
|
|
|
|
# Marlin/src/lcd/dogm/dogm_font_data_ISO10646_1.h
|
|
|
|
|
#if [ "${MARLIN_LANGS}" == "${LANGS_DEFAULT}" ]; then
|
|
|
|
|
if [ 1 = 1 ]; then
|
|
|
|
|
rm -rf ${DN_WORK}/
|
|
|
|
|
mkdir -p ${DN_WORK}
|
|
|
|
|
cd ${DN_WORK}/
|
|
|
|
|
${EXEC_BDF2U8G} -b 1 -e 127 ${FN_NEWFONT} ISO10646_1_5x7 tmp1.h
|
|
|
|
|
${EXEC_BDF2U8G} -b 1 -e 255 ${FN_NEWFONT} ISO10646_1_5x7 tmp2.h
|
|
|
|
|
|
|
|
|
|
cat << EOF >tmp3.h
|
|
|
|
|
#include <U8glib.h>
|
|
|
|
|
|
|
|
|
|
#if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7)
|
|
|
|
|
// reduced font (only sysmbols 1 - 127) - saves about 1278 bytes of FLASH
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
cat tmp1.h >>tmp3.h
|
|
|
|
|
cat << EOF >>tmp3.h
|
|
|
|
|
#else
|
|
|
|
|
// extended (original) font (sysmbols 1 - 255)
|
|
|
|
|
EOF
|
|
|
|
|
cat tmp2.h >>tmp3.h
|
|
|
|
|
cat << EOF >>tmp3.h
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
EOF
|
|
|
|
|
sed -e 's|#include "u8g.h"|#include <clib/u8g.h>|' -i tmp3.h
|
|
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
mv ${DN_WORK}/tmp3.h src/lcd/dogm/dogm_font_data_ISO10646_1.h
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|