mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-13 03:03:33 +02:00
generate-fontconfig: Create entries for all encountered families
[why] Some (the most basic) Families are not added. [how] The used shell array search is string based and can/will fail when we search for a short string that is present in a array entry as substring. Use explicit search instead. [note] Also remove some debugging output. Fixes: #918 Reported-by: Sefa Eyeoglu <contact@scrumplex.net> Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
629b29507d
commit
bdc28aa88f
@ -56,11 +56,18 @@ do
|
||||
|
||||
for font in "${FONTS[@]}"; do
|
||||
familyname=$(fc-query --format='%{family}' "${font}")
|
||||
if [[ ! "${families[*]}" == *"${familyname}"* ]]; then
|
||||
found=0
|
||||
for e in "${families[@]}"; do
|
||||
if [ "$e" = "$familyname" ]; then
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $found -eq 0 ]; then
|
||||
# family array doesn't contain the font yet
|
||||
# so let's add it
|
||||
families+=("$familyname")
|
||||
echo "adding $familyname";
|
||||
# echo "adding $familyname";
|
||||
|
||||
echo "$LINE_PREFIX Generating fontconfig for: $familyname"
|
||||
|
||||
@ -72,8 +79,8 @@ do
|
||||
printf '\n </alias>'
|
||||
} >> "$to"
|
||||
|
||||
else
|
||||
echo "no need to add $familyname";
|
||||
# else
|
||||
# echo "no need to add $familyname";
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user