Swap from Aleo to Bookerly for wider glyph support (#172)
## Summary * Swap from Aleo to Bookerly for wider glyph support * Swap from Space Grotesk to a small Noto Sans ## Additional Context * 0.11.0 swapped to Aleo which has a few issues (things like Cyrillic support for eg)
This commit is contained in:
@@ -8,39 +8,39 @@ echo "// The contents of this file are generated by ./lib/EpdFont/scripts/build-
|
||||
echo "#pragma once"
|
||||
echo ""
|
||||
|
||||
echo "#define ALEO_12_FONT_ID ($(
|
||||
echo "#define BOOKERLY_12_FONT_ID ($(
|
||||
ruby -rdigest -e 'puts [
|
||||
"./aleo_12_regular.h",
|
||||
"./aleo_12_bold.h",
|
||||
"./aleo_12_bolditalic.h",
|
||||
"./aleo_12_italic.h",
|
||||
"./bookerly_12_regular.h",
|
||||
"./bookerly_12_bold.h",
|
||||
"./bookerly_12_bolditalic.h",
|
||||
"./bookerly_12_italic.h",
|
||||
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
||||
))"
|
||||
|
||||
echo "#define ALEO_14_FONT_ID ($(
|
||||
echo "#define BOOKERLY_14_FONT_ID ($(
|
||||
ruby -rdigest -e 'puts [
|
||||
"./aleo_14_regular.h",
|
||||
"./aleo_14_bold.h",
|
||||
"./aleo_14_bolditalic.h",
|
||||
"./aleo_14_italic.h",
|
||||
"./bookerly_14_regular.h",
|
||||
"./bookerly_14_bold.h",
|
||||
"./bookerly_14_bolditalic.h",
|
||||
"./bookerly_14_italic.h",
|
||||
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
||||
))"
|
||||
|
||||
echo "#define ALEO_16_FONT_ID ($(
|
||||
echo "#define BOOKERLY_16_FONT_ID ($(
|
||||
ruby -rdigest -e 'puts [
|
||||
"./aleo_16_regular.h",
|
||||
"./aleo_16_bold.h",
|
||||
"./aleo_16_bolditalic.h",
|
||||
"./aleo_16_italic.h",
|
||||
"./bookerly_16_regular.h",
|
||||
"./bookerly_16_bold.h",
|
||||
"./bookerly_16_bolditalic.h",
|
||||
"./bookerly_16_italic.h",
|
||||
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
||||
))"
|
||||
|
||||
echo "#define ALEO_18_FONT_ID ($(
|
||||
echo "#define BOOKERLY_18_FONT_ID ($(
|
||||
ruby -rdigest -e 'puts [
|
||||
"./aleo_18_regular.h",
|
||||
"./aleo_18_bold.h",
|
||||
"./aleo_18_bolditalic.h",
|
||||
"./aleo_18_italic.h",
|
||||
"./bookerly_18_regular.h",
|
||||
"./bookerly_18_bold.h",
|
||||
"./bookerly_18_bolditalic.h",
|
||||
"./bookerly_18_italic.h",
|
||||
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
||||
))"
|
||||
|
||||
@@ -132,6 +132,6 @@ ruby -rdigest -e 'puts [
|
||||
|
||||
echo "#define SMALL_FONT_ID ($(
|
||||
ruby -rdigest -e 'puts [
|
||||
"./spacegrotesk.h",
|
||||
"./notosans_8_regular.h",
|
||||
].map{|f| Digest::SHA256.hexdigest(File.read(f)).to_i(16) }.sum % (2 ** 32) - (2 ** 31)'
|
||||
))"
|
||||
|
||||
@@ -5,14 +5,14 @@ set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
READER_FONT_STYLES=("Regular" "Italic" "Bold" "BoldItalic")
|
||||
ALEO_FONT_SIZES=(12 14 16 18)
|
||||
BOOKERLY_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 size in ${BOOKERLY_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"
|
||||
font_name="bookerly_${size}_$(echo $style | tr '[:upper:]' '[:lower:]')"
|
||||
font_path="../builtinFonts/source/Bookerly/Bookerly-${style}.ttf"
|
||||
output_path="../builtinFonts/${font_name}.h"
|
||||
python fontconvert.py $font_name $size $font_path --2bit > $output_path
|
||||
echo "Generated $output_path"
|
||||
@@ -52,4 +52,4 @@ for size in ${UI_FONT_SIZES[@]}; do
|
||||
done
|
||||
done
|
||||
|
||||
python fontconvert.py spacegrotesk 8 ../builtinFonts/source/SpaceGrotesk/SpaceGrotesk-Regular.ttf > ../builtinFonts/spacegrotesk.h
|
||||
python fontconvert.py notosans_8_regular 8 ../builtinFonts/source/NotoSans/NotoSans-Regular.ttf > ../builtinFonts/notosans_8_regular.h
|
||||
|
||||
Reference in New Issue
Block a user