Commit 6e95a010 authored by Kaushal Modi's avatar Kaushal Modi

Add U+00C0-00FF characters to Libre Baskerville

To support commentor names like Frédéric.
parent 55a53222
#!/usr/bin/env bash
# Time-stamp: <2018-05-01 11:24:34 kmodi>
# Time-stamp: <2018-05-22 11:21:55 kmodi>
# https://github.com/be5invis/Iosevka/issues/238#issuecomment-351527918
# pyftsubset - https://github.com/fonttools/fonttools
......@@ -19,13 +19,15 @@ IFS=$'\n\t'
# Unicode table: https://unicode-table.com/en/
# U+0020-007E : Basic Latin : https://unicode-table.com/en/blocks/basic-latin/
# U+00A7-00BE : Latin 1 Supplement : https://unicode-table.com/en/blocks/latin-1-supplement/
# U+00A7-00BE : Latin 1 Supplement: https://unicode-table.com/en/blocks/latin-1-supplement/
# U+00C0-00FF : more from Latin 1 Supplement, needed to cover non-English names of commentors like "Frédéric"
# U+2000-205E : General Punctuation : https://unicode-table.com/en/blocks/general-punctuation/ (includes zero width space, curly quotes, etc.)
# U+25A0,U+25CB : Unicode chars BLACK SQUARE and WHITE CIRCLE for unordered list bullets
common_args='--layout-features="" --unicodes="U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB"'
common_args='--layout-features=""'
run_pyftsubset () {
font="${1}"
unicodes="${2}"
out_dir="../../static/fonts/${font}/subset"
mkdir -p "${out_dir}"
......@@ -41,7 +43,7 @@ run_pyftsubset () {
# https://stackoverflow.com/a/407334/1219634
if [[ $file == *.ttf ]] # The ${font}/src HAS to contain .ttf font files.
then
eval "pyftsubset ${file} ${common_args} --flavor=woff --with-zopfli --output-file=${out_dir}/${basename_no_ext}.woff"
eval "pyftsubset ${file} ${common_args} --unicodes=${unicodes} --flavor=woff --with-zopfli --output-file=${out_dir}/${basename_no_ext}.woff"
fi
done
......@@ -57,10 +59,10 @@ run_pyftsubset () {
done
}
run_pyftsubset "iosevka/1.14.1"
run_pyftsubset "source-sans-pro/2.020R-ro-1.075R-it"
run_pyftsubset "linux-libertine/5.3.0"
run_pyftsubset "libre-baskerville/2012"
run_pyftsubset "andada/2013"
run_pyftsubset "libre-baskerville/2012" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB,U+00C0-00FF"
run_pyftsubset "source-sans-pro/2.020R-ro-1.075R-it" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB"
run_pyftsubset "linux-libertine/5.3.0" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB"
run_pyftsubset "andada/2013" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB"
run_pyftsubset "iosevka/1.14.1" "U+0020-007E,U+00A7-00BE,U+2000-205E,U+25A0,U+25CB"
echo "Done!"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment