]> Sergey Matveev's repositories - nnn.git/commitdiff
fix fontpreview (#903)
authorluukvbaal <31730729+luukvbaal@users.noreply.github.com>
Sun, 21 Mar 2021 02:29:06 +0000 (03:29 +0100)
committerGitHub <noreply@github.com>
Sun, 21 Mar 2021 02:29:06 +0000 (07:59 +0530)
plugins/preview-tui-ext

index 723fe7afd03c1353564e5bd9230f5aa5bbf608ba..95ec74db49cfef2bea753c3f0945996a259feec9 100755 (executable)
@@ -180,7 +180,7 @@ preview_file () {
             generate_preview "$cols" "$lines" "$1" "pdf"
         elif [ "$ext" = "epub" ] && exists gnome-epub-thumbnailer; then
             generate_preview "$cols" "$lines" "$1" "epub"
-        elif [ "${mimetype%%/*}" = "font" ] && exists fontpreview; then
+        elif [ "${mimetype#*opentype}" != "$mimetype" ] || [ "${mimetype#*font}" != "$mimetype" ] && exists fontpreview; then
             generate_preview "$cols" "$lines" "$1" "font"
         elif [ "${mimetype#*office}" != "$mimetype" ] || [ "${mimetype#*document}" != "$mimetype" ] && exists libreoffice; then
             generate_preview "$cols" "$lines" "$1" "office"