Add fonts support

This commit is contained in:
Nikita Ivanov 2022-07-27 18:00:16 +05:00
parent a649d23ff8
commit 4aee1f7fcc
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
4 changed files with 14 additions and 0 deletions

View File

@ -54,6 +54,7 @@ For example, you only need either `elinks`, `lynx` or
| archive | `atool` |
| diff | `colordiff` `delta` `diff-so-fancy` |
| directory | `ls` |
| font | `fontimage` |
| gpg-encrypted | `gpg` |
| html | `elinks` `lynx` `w3m` |
| image | `ueberzug` `chafa` |

View File

@ -94,6 +94,9 @@ T}
directory T{
ls
T}
font T{
fontimage
T}
gpg-encrypted T{
gpg
T}

View File

@ -44,6 +44,8 @@ Preview b_previews[] = {
PR(NULL, "text", "x-diff", colordiff, PREV_ATTR_NONE),
PR(NULL, "text", "x-patch", colordiff, PREV_ATTR_NONE),
PR(NULL, "font", NULL, font, PREV_ATTR_NONE),
PR("tar.gz", NULL, NULL, atool, PREV_ATTR_NONE),
PR("tgz", NULL, NULL, atool, PREV_ATTR_NONE),
PR("tgz", NULL, NULL, atool, PREV_ATTR_NONE),

8
sh/prev/font.sh Normal file
View File

@ -0,0 +1,8 @@
# font: fontimage
font() {
fontimage -o "$cache_f.png" "$f" &&
mv -- "$cache_f.png" "$cache_f"
}
convert_and_show_image font