56 lines
1.9 KiB
Bash
56 lines
1.9 KiB
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
set -e
|
||
|
|
|
||
|
|
cd "$(dirname "$0")"
|
||
|
|
|
||
|
|
READER_FONT_STYLES=("Regular" "Italic" "Bold" "BoldItalic")
|
||
|
|
ALEO_FONT_SIZES=(12 14 16 18)
|
||
|
|
NOTOSANS_FONT_SIZES=(12 14 16 18)
|
||
|
|
OPENDYSLEXIC_FONT_SIZES=(8 10 12 14)
|
||
|
|
|
||
|
|
for size in ${ALEO_FONT_SIZES[@]}; do
|
||
|
|
for style in ${READER_FONT_STYLES[@]}; do
|
||
|
|
font_name="aleo_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
||
|
|
font_path="../builtinFonts/source/Aleo/Aleo-${style}.ttf"
|
||
|
|
output_path="../builtinFonts/${font_name}.h"
|
||
|
|
python fontconvert.py $font_name $size $font_path --2bit > $output_path
|
||
|
|
echo "Generated $output_path"
|
||
|
|
done
|
||
|
|
done
|
||
|
|
|
||
|
|
for size in ${NOTOSANS_FONT_SIZES[@]}; do
|
||
|
|
for style in ${READER_FONT_STYLES[@]}; do
|
||
|
|
font_name="notosans_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
||
|
|
font_path="../builtinFonts/source/NotoSans/NotoSans-${style}.ttf"
|
||
|
|
output_path="../builtinFonts/${font_name}.h"
|
||
|
|
python fontconvert.py $font_name $size $font_path --2bit > $output_path
|
||
|
|
echo "Generated $output_path"
|
||
|
|
done
|
||
|
|
done
|
||
|
|
|
||
|
|
for size in ${OPENDYSLEXIC_FONT_SIZES[@]}; do
|
||
|
|
for style in ${READER_FONT_STYLES[@]}; do
|
||
|
|
font_name="opendyslexic_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
||
|
|
font_path="../builtinFonts/source/OpenDyslexic/OpenDyslexic-${style}.otf"
|
||
|
|
output_path="../builtinFonts/${font_name}.h"
|
||
|
|
python fontconvert.py $font_name $size $font_path --2bit > $output_path
|
||
|
|
echo "Generated $output_path"
|
||
|
|
done
|
||
|
|
done
|
||
|
|
|
||
|
|
UI_FONT_SIZES=(10 12)
|
||
|
|
UI_FONT_STYLES=("Regular" "Bold")
|
||
|
|
|
||
|
|
for size in ${UI_FONT_SIZES[@]}; do
|
||
|
|
for style in ${UI_FONT_STYLES[@]}; do
|
||
|
|
font_name="ubuntu_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
||
|
|
font_path="../builtinFonts/source/Ubuntu/Ubuntu-${style}.ttf"
|
||
|
|
output_path="../builtinFonts/${font_name}.h"
|
||
|
|
python fontconvert.py $font_name $size $font_path > $output_path
|
||
|
|
echo "Generated $output_path"
|
||
|
|
done
|
||
|
|
done
|
||
|
|
|
||
|
|
python fontconvert.py spacegrotesk 8 ../builtinFonts/source/SpaceGrotesk/SpaceGrotesk-Regular.ttf > ../builtinFonts/spacegrotesk.h
|