bashrc/.bashrc.d/fontfind.bash

8 lines
208 B
Bash
Raw Normal View History

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 }'
}