All Projects → sdushantha → Fontpreview

sdushantha / Fontpreview

Licence: mit
Highly customizable and minimal font previewer written in bash

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Fontpreview

Licenseplist
A license list generator of all your dependencies for iOS applications
Stars: ✭ 1,996 (+201.97%)
Mutual labels:  commandline, cli
Picocli
Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
Stars: ✭ 3,286 (+397.13%)
Mutual labels:  commandline, cli
You Dont Need Gui
Stop relying on GUI; CLI **ROCKS**
Stars: ✭ 4,766 (+621.03%)
Mutual labels:  commandline, cli
Appicon
AppIcon generates *.appiconset contains each resolution image for iOS
Stars: ✭ 1,454 (+119.97%)
Mutual labels:  commandline, cli
Imag
imag - Text based personal information management suite
Stars: ✭ 318 (-51.89%)
Mutual labels:  commandline, cli
Brotab
Control your browser's tabs from the command line
Stars: ✭ 137 (-79.27%)
Mutual labels:  commandline, cli
Ace
Node.js framework for creating command line applications
Stars: ✭ 233 (-64.75%)
Mutual labels:  commandline, cli
Swiftline
Swiftline is a set of tools to help you create command line applications.
Stars: ✭ 1,156 (+74.89%)
Mutual labels:  commandline, cli
Chalk
🖍 Terminal string styling done right
Stars: ✭ 17,566 (+2557.49%)
Mutual labels:  commandline, cli
Croissant
🥐 A Lua REPL and debugger
Stars: ✭ 285 (-56.88%)
Mutual labels:  commandline, cli
Cordless
The Discord terminal client you never knew you wanted.
Stars: ✭ 1,391 (+110.44%)
Mutual labels:  commandline, cli
Cobra
A Commander for modern Go CLI interactions
Stars: ✭ 24,437 (+3596.97%)
Mutual labels:  commandline, cli
Lc
licensechecker (lc) a command line application which scans directories and identifies what software license things are under producing reports as either SPDX, CSV, JSON, XLSX or CLI Tabular output. Dual-licensed under MIT or the UNLICENSE.
Stars: ✭ 93 (-85.93%)
Mutual labels:  commandline, cli
Gitin
commit/branch/workdir explorer for git
Stars: ✭ 1,815 (+174.58%)
Mutual labels:  commandline, cli
Fileinfo
📄Get information on over 10,000 file extensions right from the terminal
Stars: ✭ 86 (-86.99%)
Mutual labels:  commandline, cli
Gitlab Cli
Create a merge request from command line in gitlab
Stars: ✭ 224 (-66.11%)
Mutual labels:  commandline, cli
Ntutils
Various Command Line Utilities Ported to Windows NT
Stars: ✭ 58 (-91.23%)
Mutual labels:  commandline, cli
Slackcat
CLI utility to post files and command output to slack
Stars: ✭ 1,127 (+70.5%)
Mutual labels:  commandline, cli
Starcli
✨ Browse GitHub trending projects from your command line
Stars: ✭ 269 (-59.3%)
Mutual labels:  commandline, cli
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (-47.81%)
Mutual labels:  commandline, cli


✨ Very customizable and minimal font previewer written in bash ✨

fontpreview is a commandline tool that lets you quickly search for fonts that are installed on your machine and preview them. The fuzzy search feature is provided by fzf and the preview is generated with imagemagick and then displayed using sxiv. This tool is highly customizable, almost all of the variables in this tool can be changed using the commandline flags or you can configure them using environment variables.

Dependencies

  • xdotool
  • fzf
  • imagemagick
  • sxiv

Installation

Install using make

# Clone the repo
$ git clone https://github.com/sdushantha/fontpreview

# Change your current directory to fontpreview
$ cd fontpreview

# Install it
$ sudo make install

Install it locally

# Download the fontpreview source code, save as fontpreview
# and make it executeable
$ curl -L https://git.io/raw_fontpreview > fontpreview && chmod +x fontpreview

# Then move fontpreview to somewhere in your $PATH
# Here is an example
$ mv fontpreview ~/scripts/

Usage

$ fontpreview --help
usage: fontpreview [-h] [--size "px"] [--position "+x+y"] [--search-prompt SEARCH_PROMPT]
                   [--font-size "FONT_SIZE"] [--bg-color "BG_COLOR"] [--fg-color "FG_COLOR"]
                   [--preview-text "PREVIEW_TEXT"] [-i font.otf] [-o preview.png] [--version]

┌─┐┌─┐┌┐┌┌┬┐┌─┐┬─┐┌─┐┬  ┬┬┌─┐┬ ┬
├┤ │ ││││ │ ├─┘├┬┘├┤ └┐┌┘│├┤ │││
└  └─┘┘└┘ ┴ ┴  ┴└─└─┘ └┘ ┴└─┘└┴┘
Very customizable and minimal font previewer written in bash

optional arguments:
   -h, --help            show this help message and exit
   -i, --input           filename of the input font (.otf, .ttf, .woff are supported)
   -o, --output          filename of the output preview image (input.png if not set)
   --size                size of the font preview window
   --position            the position where the font preview window should be displayed
   --search-prompt       input prompt of fuzzy searcher
   --font-size           font size
   --bg-color            background color of the font preview window
   --fg-color            foreground color of the font preview window
   --preview-text        preview text that should be displayed in the font preview window
   --version             show the version of fontpreview you are using

If you want to generate a preview image for a single font file (.otf, .ttf, and .woff are supported), use the -i and -o option to indicate the filename of the input font and the output preview image.

$ fontpreview -i font.otf -o preview.png

This can be used with überzug to implement font preview within terminal file managers such as vifm.

A detailed setup instructions can be found here

Configure

You can configure fontpreview through environment variables.

This can be in your .bashrc, .zshrc, etc

# Input prompt of fuzzy searcher
export FONTPREVIEW_SEARCH_PROMPT="❯ "

# Size of the font preview window
export FONTPREVIEW_SIZE=532x365

# The position where the font preview window should be displayed
export FONTPREVIEW_POSITION="+0+0"

# Font size
export FONTPREVIEW_FONT_SIZE=38

# Background color of the font preview window
export FONTPREVIEW_BG_COLOR="#ffffff"

# Foreground color of the font preview window
export FONTPREVIEW_FG_COLOR="#000000"

# Preview text that should be displayed in the font preview window
export FONTPREVIEW_PREVIEW_TEXT="ABCDEFGHIJKLM\nNOPQRSTUVWXYZ\nabcdefghijklm\nnopqrstuvwxyz\n1234567890\n[email protected]$\%(){}[]"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].