How do I print 'block' letters in the terminal?

6,909

Solution 1

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

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.

Solution 2

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).

Share:
6,909

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    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.