2022-12-16 18:01:54 +02:00
|
|
|
#!/usr/bin/env bash
|
2023-06-04 22:32:30 +02:00
|
|
|
# Nerd Fonts Version: 3.0.2
|
2023-04-28 18:16:46 +02:00
|
|
|
# Script Version: 1.1.0
|
2022-12-16 18:01:54 +02:00
|
|
|
# Generates web fonts for the website and cheat sheet
|
|
|
|
|
|
|
|
# Destination in the gh-pages branch:
|
|
|
|
# ./assets/fonts/Symbols-2048-em Nerd Font Complete.woff2
|
|
|
|
# ./assets/fonts/Symbols-2048-em Nerd Font Complete.woff
|
|
|
|
|
|
|
|
font_file="Symbols-2048-em Nerd Font Complete"
|
2023-04-28 18:16:46 +02:00
|
|
|
font_src="SymbolsNerdFontMono-Regular.ttf"
|
|
|
|
patched_dir="../../patched-fonts/NerdFontsSymbolsOnly"
|
2022-12-16 18:01:54 +02:00
|
|
|
webfontdir="../../webfonts"
|
|
|
|
|
|
|
|
if [ ! -d "${webfontdir}" ]; then
|
|
|
|
mkdir "${webfontdir}"
|
|
|
|
fi
|
|
|
|
|
2023-04-28 18:16:46 +02:00
|
|
|
fontforge -lang=ff -c "Open(\"${patched_dir}/${font_src}\"); Generate(\"${webfontdir}/${font_file}.woff\")"
|
|
|
|
fontforge -lang=ff -c "Open(\"${patched_dir}/${font_src}\"); Generate(\"${webfontdir}/${font_file}.woff2\")"
|