subset_fonts.sh 960 B

12345678910111213141516171819
  1. #!/bin/sh
  2. # Regenerate the checked-in UI font subsets. Requires pyftsubset (fonttools)
  3. # and the Croscore/Liberation source fonts; normal builds use the checked-in
  4. # files and do not run this script.
  5. set -e
  6. cd "$(dirname "$0")/.."
  7. U='U+0020-00FF,U+20AC,U+2013-2014,U+2018-2019,U+201C-201D,U+2022,U+2026,U+00A0'
  8. SUB=${PYFTSUBSET:-pyftsubset}
  9. "$SUB" /usr/share/fonts/croscore/Arimo-Regular.ttf --unicodes="$U" \
  10. --layout-features='' --output-file=fonts/sans.ttf
  11. "$SUB" /usr/share/fonts/croscore/Arimo-Bold.ttf --unicodes="$U" \
  12. --layout-features='' --output-file=fonts/sans-b.ttf
  13. "$SUB" /usr/share/fonts/croscore/Arimo-Italic.ttf --unicodes="$U" \
  14. --layout-features='' --output-file=fonts/sans-i.ttf
  15. "$SUB" /usr/share/fonts/croscore/Arimo-BoldItalic.ttf --unicodes="$U" \
  16. --layout-features='' --output-file=fonts/sans-bi.ttf
  17. "$SUB" /usr/share/fonts/liberation/LiberationMono-Regular.ttf --unicodes="$U" \
  18. --layout-features='' --output-file=fonts/mono.ttf