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

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.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

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

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply