Epsongelion nerd fonts build workflow
apt install fontforge python3-fontforge curl
curl -sL " https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FontPatcher.zip" -o fontpatcher
cd fontpatcher
create and run the build script
#! /bin/sh
# get fonts
curl -sL " https://dl.dafont.com/dl/?f=linux_libertine" -o font.zip
unzip -p font.zip LinLibertine_R.ttf > libertine_r.ttf
unzip -p font.zip LinLibertine_aBL.ttf > libertine_bi.ttf
unzip -p font.zip LinLibertine_RB.ttf > libertine_b.ttf
unzip -p font.zip LinLibertine_RI.ttf > libertine_i.ttf
rm font.zip
# patch em
fontforge -script ../font-patcher ./libertine_r.ttf -c --name Epsongelion-Regular
fontforge -script ../font-patcher ./libertine_b.ttf -c --name Epsongelion-Bold
fontforge -script ../font-patcher ./libertine_i.ttf -c --name Epsongelion-Italic
fontforge -script ../font-patcher ./libertine_bi.ttf -c --name Epsongelion-BoldItalic
# encode em
R=$( base64 -i -w 0 Epsongelion-Regular.ttf)
B=$( base64 -i -w 0 Epsongelion-Regular.ttf)
I=$( base64 -i -w 0 Epsongelion-Regular.ttf)
BI=$( base64 -i -w 0 Epsongelion-Regular.ttf)
# generate the css
cat << X0 > Epsongelion.css
@font-face {
font-family: "Epsongelion";
font-style: normal;
font-weight: 400;
src: url(data:font/ttf;charset-utf-8;base64,${R} )
}
@font-face {
font-family: "Epsongelion";
font-style: normal;
font-weight: 700;
src: url(data:font/ttf;charset-utf-8;base64,${B} )
}
@font-face {
font-family: "Epsongelion";
font-style: italic;
font-weight: 400;
src: url(data:font/ttf;charset-utf-8;base64,${I} )
}
@font-face {
font-family: "Epsongelion";
font-style: italic;
font-weight: 700;
src: url(data:font/ttf;charset-utf-8;base64,${BI} )
}
X0
echo " Epsongelion.css generated"