From f259695621ebfa39849855ea243f68aa9eba26eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis?= Date: Wed, 24 Jun 2015 04:31:10 +0300 Subject: [PATCH] sd-vconsole: fix console font search to include required fonts need to look for font files with extensions ".psfu", ".psf", ".cp" and ".fnt" font files can be compresed with gzip or bzip2 and some font files aren't fonts itself but just list of partial font names those start with header "# combine partial fonts" --- install/sd-vconsole | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/install/sd-vconsole b/install/sd-vconsole index 011856d..fe62faf 100644 --- a/install/sd-vconsole +++ b/install/sd-vconsole @@ -49,11 +49,24 @@ build() { [[ $KEYMAP_TOGGLE ]] && add_keymap_file $KEYMAP_TOGGLE.map if [[ $FONT ]]; then - for file in "/usr/share/kbd/consolefonts/$FONT".@(fnt|psf?(u))?(.gz); do + for file in "/usr/share/kbd/consolefonts/$FONT"?(\.psfu|\.psf|\.cp|\.fnt)?(\.gz|\.bz2); do get_decompressor "$file" add_dir "${of%/*}" $cat "$file" > "$BUILDROOT/$of" + if [ "$(head -c 23 $BUILDROOT/$of)" = "# combine partial fonts" ]; then + while read filename + do + for file2 in "/usr/share/kbd/consolefonts/partialfonts/$filename"?(\.gz|\.bz2); do + get_decompressor "$file2" + add_dir "${of%/*}" + $cat "$file2" > "$BUILDROOT/$of" + done + done < <(sed '/^#/d' $BUILDROOT/$of) + fi + exit 0 done + error "sd-vconsole: requested font not found: '%s'" "$FONT" + exit 1 fi ) } -- 2.4.4