How do I echo/print block lettering in the terminal like:

enter image description here ?

figlet and toilet don't help. Neither do U+25A0 or U+2588 unicode characters.

This is not a duplicate. As I said, figlet, banner and toilet have no styles for what I want, as depicted in the image.

  • 1
    banner, cowsay, and figlet (en.wikipedia.org/wiki/FIGlet) are all ascii terminal utilities of the golden ages, that is, no unicode. you could probably add some characters by contemplating their source code. Eric Olson added OpenType to figlet you could follow his footsteps and add unicode. – Theophrastus Jun 4 '16 at 14:38
  • 1
    Possible duplicate of ASCII art generator. Also Colorful ssh banner. Good questions should reflect some initial investigation. – Thomas Dickey Jun 4 '16 at 16:23
  • @ThomasDickey As I said, figlet, toilet and banner do not work, as they don't have the styles/modes for what I want. – UniversallyUniqueID Jun 4 '16 at 16:31
  • I do not see the problem with echo "█■" (provided console font defines the shape and LANG is set to smthing.utf8. The latarcyrheb-sun16 does since Fedora20 at least. ) – Serge Jun 4 '16 at 23:24
  • Or maybe using terminal escape sequences, like \033[41m for red etc. to make the "dots"; foreground colours 40-47, background 30-37... I'm not sure about the 5x7 rendering (other than manually). – Ralph Rönnquist Jun 5 '16 at 0:36
up vote 4 down vote accepted

This is part of the output of the linuxlogo command, specifically part of the output of

linuxlogo -L gnu_linux
which in full looks like this screenshot from the Debian version:

Screenshots of the linuxlogo command http://screenshots.debian.net/screenshots/l/linuxlogo/2629_large.png

The logos are constructed from templates that accompany the command. This is the one for the gnu_linux logo. There are 30 logos in the original package. Debian adds a debian_banner_2 logo.

From reading these logo files, right there in the source trees, one can see how the several different forms of lettering in the various logos are constructed with ECMA-48 and ISO 8613-6 control sequences, and one can derive further logos of one's own.

You can always use banner and convert the # to or to a space in reverse video.

On Debian-based systems, you'll find the SysV style banner in the sysvbanner package and the BSD-style one (called printerbanner there) in the bsdmainutils package. Or use figlet -f banner:

$ figlet -f banner test | sed $'s/#/█/g'

█████ ██████  ████  █████
  █   █      █        █
  █   █████   ████    █
  █   █           █   █
  █   █      █    █   █
  █   ██████  ████    █

$ printerbanner -w 40 test | sed 's/#/█/g'
                         █
             █████████████████
          ████████████████████
          ████████████████████
          ██             █
          ██
            █
               █████
            ███████████
           ██████████████
          ██     █     ██
          █      █       █
          █      █       █
          █      █      ██
           █     ████████
            ██   ██████
                 ███
          ████      ██
          ████    ██████
          ██     ████████
          █     ████     █
          █     ████     █
          █     ████    ██
          █    ████    ██
           ████████   ████
            █████
                         █
             █████████████████
          ████████████████████
          ████████████████████
          ██             █
          ██
            █

$ banner test | sed 's/#/█/g'

  █████  ██████   ████    █████
    █    █       █          █
    █    █████    ████      █
    █    █            █     █
    █    █       █    █     █
    █    ██████   ████      █

For the inverse video space:

banner text | sed $'s/#/\e[7m \e[m/g'

($'...' is a form of quote available in most modern shells like zsh, ksh93, bash, mksh or FreeBSD sh. If your shell lacks support for it use "$(printf 's/#/\33[7m \33[m/g')" instead).

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.