1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2025-07-01 15:40:43 +02:00

Creation of Font class and code update accordingly

This commit is contained in:
Pierre-Yves Rollo
2018-07-08 20:36:34 +02:00
parent 23bcd70199
commit c6cad702bc
7 changed files with 533 additions and 343 deletions

View File

@ -3,6 +3,17 @@
scriptname=$(basename $0)
identify="identify"
usage() {
echo "Usage: $0 fontname"
echo "fontname: The name of the font. Must correspond to existing texture/font_<fontname>_????.png files"
}
if [ $# -ne 1 ]
then
usage
exit 1
fi
font_name=$1
for f in textures/font_${font_name}_????.png
@ -41,8 +52,12 @@ $luafile generated by $scriptname $(LANG=en_US date)
font_api.register_font(
'$font_name',
$font_height,
{ $font_widths }
{
height = $font_height,
widths = {
$font_widths
},
}
);
" > font_$font_name.lua