Recover parts of the regression fiasco
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -5,9 +5,8 @@ set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
READER_FONT_STYLES=("Regular" "Italic" "Bold" "BoldItalic")
|
||||
BOOKERLY_FONT_SIZES=(12 14 16 18)
|
||||
NOTOSANS_FONT_SIZES=(12 14 16 18)
|
||||
OPENDYSLEXIC_FONT_SIZES=(8 10 12 14)
|
||||
BOOKERLY_FONT_SIZES=(10 12 14 16 18)
|
||||
NOTOSANS_FONT_SIZES=(10 12 14 16 18)
|
||||
|
||||
for size in ${BOOKERLY_FONT_SIZES[@]}; do
|
||||
for style in ${READER_FONT_STYLES[@]}; do
|
||||
@@ -29,28 +28,36 @@ for size in ${NOTOSANS_FONT_SIZES[@]}; do
|
||||
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 --compress > $output_path
|
||||
echo "Generated $output_path"
|
||||
done
|
||||
done
|
||||
|
||||
UI_FONT_SIZES=(10 12)
|
||||
UI_FONT_STYLES=("Regular" "Bold")
|
||||
UI_LANG_INTERVALS=(
|
||||
"0x0000,0x007F"
|
||||
"0x0080,0x00FF"
|
||||
"0x0100,0x017F"
|
||||
"0x01A0,0x01A1"
|
||||
"0x01AF,0x01B0"
|
||||
"0x01C4,0x021F"
|
||||
"0x0300,0x036F"
|
||||
"0x0400,0x04FF"
|
||||
"0x1EA0,0x1EF9"
|
||||
"0x2010,0x206F"
|
||||
"0x20A0,0x20CF"
|
||||
"0xFB00,0xFB06"
|
||||
"0xFFFD,0xFFFD"
|
||||
)
|
||||
|
||||
for size in ${UI_FONT_SIZES[@]}; do
|
||||
for style in ${UI_FONT_STYLES[@]}; do
|
||||
font_name="ubuntu_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
||||
ubuntu_path="../builtinFonts/source/Ubuntu/Ubuntu-${style}.ttf"
|
||||
# NotoSans used as fallback to fill missing glyphs (e.g. Vietnamese U+1EA0-1EF9)
|
||||
# that are absent from the Ubuntu TTF source.
|
||||
noto_path="../builtinFonts/source/NotoSans/NotoSans-${style}.ttf"
|
||||
font_name="inter_ui_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
||||
inter_path="../builtinFonts/source/Inter/Inter-${style}.ttf"
|
||||
output_path="../builtinFonts/${font_name}.h"
|
||||
python fontconvert.py $font_name $size $ubuntu_path $noto_path > $output_path
|
||||
|
||||
cmd=(python fontconvert.py "$font_name" "$size" "$inter_path")
|
||||
for interval in "${UI_LANG_INTERVALS[@]}"; do
|
||||
cmd+=(--additional-intervals "$interval")
|
||||
done
|
||||
"${cmd[@]}" > "$output_path"
|
||||
|
||||
echo "Generated $output_path"
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user