bashrc/.bashrc.d/fontfind.sh

8 lines
208 B
Bash

fontfind() {
if [[ -z $1 || ${#1} -gt 1 ]]; then
printf "E: only one character accepted"
fi
local glyph=$1
FC_DEBUG=4 pango-view -qt "$glyph" 2>&1 | awk -F \" '/family: / { m = $2 } END { print m }'
}