ASCII art using Python pyfiglet module

PythonServer Side ProgrammingProgramming

The ASCII text can be used to display many stylish texts by using the module pyfiglet. After installing this module we can use it to control the font that can be used to display the result. In the below program we see various results by choosing various font types.

Example

# import pyfiglet module
import pyfiglet
#Text in default font
out = pyfiglet.figlet_format("Point")
print(out)

Output

Running the above code gives us the following result −

Example

# import pyfiglet module
import pyfiglet
#Text in slant font
out = pyfiglet.figlet_format("Point", font="slant")
print(out)

Output

Running the above code gives us the following result −

Example

# import pyfiglet module
import pyfiglet
#Text in 3D font
out = pyfiglet.figlet_format("Point", font="3-d")
print(out)

Output

Running the above code gives us the following result −

Example

# import pyfiglet module
import pyfiglet
#Text in 3×5 font
out = pyfiglet.figlet_format("Point", font="3x5")
print(out)

Output

Running the above code gives us the following result −

Example

import pyfiglet
#Text in alligator font
out = pyfiglet.figlet_format("Point", font="alligator")
print(out)

Output

Running the above code gives us the following result −

Example

import pyfiglet
#Text in dot matrix font
out = pyfiglet.figlet_format("Point", font="dotmatrix")
print(out)

Output

Running the above code gives us the following result −

Example

import pyfiglet
#Text in bubble font
out = pyfiglet.figlet_format("Point", font="bubble")
print(out)

Output

Running the above code gives us the following result −

 _   _   _   _   _
 / \ / \ / \ / \ / \
( P | o | i | n | t )
 \_/ \_/ \_/ \_/ \_/

Example

import pyfiglet
# Text in digital font
out = pyfiglet.figlet_format("Point", font = "digital" )
print(out)

Output

Running the above code gives us the following result −

+-+-+-+-+-+
|P|o|i|n|t|
+-+-+-+-+-+
raja
Published on 18-Feb-2020 16:17:00
Advertisements