From fc62e87c7f3c7e14d2a0f22d16074ff2ff17de51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haoran=20S=2E=20Diao=20=28=E5=88=81=E6=B5=A9=E7=84=B6=29?= <0@hairydiode.xyz> Date: Fri, 30 Jun 2023 03:47:33 -0700 Subject: Added smarter font directory handling --- fontd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fontd') diff --git a/fontd b/fontd index d6754d0..aecd636 100755 --- a/fontd +++ b/fontd @@ -4,9 +4,12 @@ # display CHAR if found in any bdf fonts in DIR/ # NOTE: CHAR must be in decimal encoding point format of bdf +#expands ~ and *, it's a bit unsafe +eval fonts="$2/*bdf" + #gets font size, it can take multiple fonts as input so only get the first one #and assume they're all the same size -size=$(cat $2/*bdf | grep -m 1 PIXEL_SIZE | awk '{print $2}') +size=$(cat $fonts | grep -m 1 PIXEL_SIZE | awk '{print $2}') #get bdf bitmap info from bdf #fflag ensures only one result even with multiple bdfs, cflag finds the char, -- cgit v1.1