Created
January 11, 2020 21:10
-
-
Save oakaigh/2f970d18c7fe3832a29b22e25d658787 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function otf2psf() { | |
local res=72 fontsize=16 cpos=256 avgwid=80 | |
for fontloc in "$@"; do | |
local fontname="$(basename -- "${fontloc}" .otf)" | |
otf2bdf -r ${res} -p ${fontsize} ${fontloc} | sed -e "s/AVERAGE_WIDTH.*/AVERAGE_WIDTH ${avgwid}/" > ${fontname}.bdf | |
bdf2psf --fb ${fontname}.bdf /usr/share/bdf2psf/standard.equivalents /usr/share/bdf2psf/required.set+/usr/share/bdf2psf/useful.set ${cpos} ${fontname}.psf | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment