Skip to content

Instantly share code, notes, and snippets.

@damieng
Last active April 21, 2019 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damieng/dafa7e934a3f35afcee54a4d788580a6 to your computer and use it in GitHub Desktop.
Save damieng/dafa7e934a3f35afcee54a4d788580a6 to your computer and use it in GitHub Desktop.
ZX to TTF font conversion shell script (required psftools modified, PixelWorld and FontLab Studio + scripts)
#!/bin/bash
fl5reg="HKCU\Software\FontLab\Studio 5\Directories"
for i in "$@"
do
name="${i%.*}"
echo Processing $name
pw preview "$i" . >> /dev/null
psf="${name}.psf"
vfb="${name}.vfb"
zx2psf "$i" "${psf}" --mode=move1 --graphics=none
psf2bdf "${psf}" "${name}.bdf" --fontname="${name}"
cp ../Template.vfb "${vfb}"
wincur="$(wslpath -w "`pwd`")"
reg.exe add "${fl5reg}" /f /v "BitmapFonts" /t REG_SZ /d "${wincur}"
"/mnt/c/Program Files (x86)/Fontlab/Studio 5/Studio 5.exe" "${vfb}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment