Python | ASCII art using pyfiglet module

pyfiglet takes ASCII text and renders it in ASCII art fonts. figlet_format method convert ASCII text into ASCII art fonts.

It takes following arguments :

text
font ( DEFAULT_FONT = 'standard' )

Command to install pyfiglet module :

pip install pyfiglet

 
Code #1: Text in default font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks For Geeks")
print(result)

chevron_right


Output:



  ____           _          _____             ____           _        
 / ___| ___  ___| | _____  |  ___|__  _ __   / ___| ___  ___| | _____ 
| |  _ / _ \/ _ \ |/ / __| | |_ / _ \| '__| | |  _ / _ \/ _ \ |/ / __|
| |_| |  __/  __/      \__ \ |  _| (_) | |    | |_| |  __/  __/      \__ \
 \____|\___|\___|_|\_\___/ |_|  \___/|_|     \____|\___|\___|_|\_\___/
                                                                      

 
Code #2: Text in slant font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks For Geeks", font = "slant"  )
print(result)

chevron_right


Output:

   ______          __           ______              ______          __       
  / ____/__  ___  / /_______   / ____/___  _____   / ____/__  ___  / /_______
 / / __/ _ \/ _ \/ //_/ ___/  / /_  / __ \/ ___/  / / __/ _ \/ _ \/ //_/ ___/
/ /_/ /  __/  __/      (__  )  / __/ / /_/ / /     / /_/ /  __/  __/    (__  ) 
\____/\___/\___/_/|_/____/  /_/    \____/_/      \____/\___/\___/_/|_/____/  
                                                                             

 
Code #3: Text in 3-d font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("G e e k", font = "3-d" )
print(result)

chevron_right


Output:

   ********                        **    
  **//////**                      /**    
 **      //     *****     *****   /**  **
/**            **///**   **///**  /** ** 
/**    *****  /*******  /*******  /****  
//**  ////**  /**////   /**////   /**/** 
 //********   //******  //******  /**//**
  ////////     //////    //////   //  //    

 
Code #4: Text in 3×5 font

filter_none

edit
close

play_arrow

link
brightness_4
code

# importing pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("G e e k", font = "3x5" )
print(result)

chevron_right


Output:

                             
 ##                     #   
#       ###     ###     # # 
# #     ##      ##      ##  
# #     ###     ###     # # 
 ##                         

 
Code #5: Text in 5lineoblique font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("G e e k", font = "5lineoblique" )
print(result)

chevron_right


Output:

                                                
    //   ) )                                       
   //              ___          ___         / ___  
  //  ____       //___) )     //___) )     //\ \   
 //    / /      //           //           //  \ \  
((____/ /      ((____       ((____       //    \ \   

 
Code #6: Text in alphabet font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("G e e k", font = "alphabet" )
print(result)

chevron_right


Output:



 GGG             k    
G                k k  
G  GG  eee  eee  kk   
G   G  e e  e e  k k  
 GGG   ee   ee   k  k 

 
Code #7: Text in banner3-D font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks", font = "banner3-D" )
print(result)

chevron_right


Output:

:'######:::'########:'########:'##:::'##::'######::
'##... ##:: ##.....:: ##.....:: ##::'##::'##... ##:
 ##:::..::: ##::::::: ##::::::: ##:'##::: ##:::..::
 ##::'####: ######::: ######::: #####::::. ######::
 ##::: ##:: ##...:::: ##...:::: ##. ##::::..... ##:
 ##::: ##:: ##::::::: ##::::::: ##:. ##::'##::: ##:
. ######::: ########: ########: ##::. ##:. ######::
:......::::........::........::..::::..:::......::: 

 
Code #8: Text in doh font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks", font = "doh" )
print(result)

chevron_right


Output:

                                                                               
        GGGGGGGGGGGGG                                       kkkkkkkk           
     GGG::::::::::::G                                       k::::::k           
   GG:::::::::::::::G                                       k::::::k           
  G:::::GGGGGGGG::::G                                       k::::::k           
 G:::::G       GGGGGG    eeeeeeeeeeee        eeeeeeeeeeee    k:::::k    kkkkkkk
G:::::G                ee::::::::::::ee    ee::::::::::::ee  k:::::k   k:::::k 
G:::::G               e::::::eeeee:::::ee e::::::eeeee:::::eek:::::k  k:::::k  
G:::::G    GGGGGGGGGGe::::::e     e:::::ee::::::e     e:::::ek:::::k k:::::k   
G:::::G    G::::::::Ge:::::::eeeee::::::ee:::::::eeeee::::::ek::::::k:::::k    
G:::::G    GGGGG::::Ge:::::::::::::::::e e:::::::::::::::::e k:::::::::::k     
G:::::G        G::::Ge::::::eeeeeeeeeee  e::::::eeeeeeeeeee  k:::::::::::k     
 G:::::G       G::::Ge:::::::e           e:::::::e           k::::::k:::::k    
  G:::::GGGGGGGG::::Ge::::::::e          e::::::::e         k::::::k k:::::k   
   GG:::::::::::::::G e::::::::eeeeeeee   e::::::::eeeeeeee k::::::k  k:::::k  
     GGG::::::GGG:::G  ee:::::::::::::e    ee:::::::::::::e k::::::k   k:::::k 
        GGGGGG   GGGG    eeeeeeeeeeeeee      eeeeeeeeeeeeee kkkkkkkk    kkkkkkk           

 
Code #9: Text in isometric1 font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks", font = "isometric1" )
print(result)

chevron_right


Output:


      ___           ___           ___           ___           ___     
     /\  \         /\  \         /\  \         /\__\         /\  \    
    /::\  \       /::\  \       /::\  \       /:/  /        /::\  \   
   /:/\:\  \     /:/\:\  \     /:/\:\  \     /:/__/        /:/\ \  \  
  /:/  \:\  \   /::\~\:\  \   /::\~\:\  \   /::\__\____   _\:\~\ \  \ 
 /:/__/_\:\__\ /:/\:\ \:\__\ /:/\:\ \:\__\ /:/\:::::\__\ /\ \:\ \ \__\
 \:\  /\ \/__/ \:\~\:\ \/__/ \:\~\:\ \/__/ \/_|:|~~|~    \:\ \:\ \/__/
  \:\ \:\__\    \:\ \:\__\    \:\ \:\__\      |:|  |      \:\ \:\__\  
   \:\/:/  /     \:\ \/__/     \:\ \/__/      |:|  |       \:\/:/  /  
    \::/  /       \:\__\        \:\__\        |:|  |        \::/  /   
     \/__/         \/__/         \/__/         \|__|         \/__/    

 
Code #10: Text in letters font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks", font = "letters" )
print(result)

chevron_right


Output:

  GGGG                kk           
 GG  GG   eee    eee  kk  kk  sss  
GG      ee   e ee   e kkkkk  s     
GG   GG eeeee  eeeee  kk kk   sss  
 GGGGGG  eeeee  eeeee kk  kk     s 
                              sss  

 
Code #11: Text in alligator font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("G e e k", font = "alligator" )
print(result)

chevron_right


Output:



      ::::::::        ::::::::::        ::::::::::        :::    ::: 
    :+:    :+:       :+:               :+:               :+:   :+:   
   +:+              +:+               +:+               +:+  +:+     
  :#:              +#++:++#          +#++:++#          +#++:++       
 +#+   +#+#       +#+               +#+               +#+  +#+       
#+#    #+#       #+#               #+#               #+#   #+#       
########        ##########        ##########        ###    ###       

 
Code #12: Text in dot matrix font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks", font = "dotmatrix" )
print(result)

chevron_right


Output:

    _  _  _                                   _                         
 _ (_)(_)(_) _                               (_)                        
(_)         (_)  _  _  _  _     _  _  _  _   (_)     _   _  _  _  _     
(_)    _  _  _  (_)(_)(_)(_)_  (_)(_)(_)(_)_ (_)   _(_)_(_)(_)(_)(_)    
(_)   (_)(_)(_)(_) _  _  _ (_)(_) _  _  _ (_)(_) _(_) (_)_  _  _  _     
(_)         (_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)(_)_    (_)(_)(_)(_)_   
(_) _  _  _ (_)(_)_  _  _  _  (_)_  _  _  _  (_)  (_)_   _  _  _  _(_)  
   (_)(_)(_)(_)  (_)(_)(_)(_)   (_)(_)(_)(_) (_)    (_) (_)(_)(_)(_)    
                                                                        

 
Code #13: Text in bubble font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks For Geeks", font = "bubble" )
print(result)

chevron_right


Output:

  _   _   _   _   _     _   _   _     _   _   _   _   _  
 / \ / \ / \ / \ / \   / \ / \ / \   / \ / \ / \ / \ / \ 
( G | e | e | k | s ) ( F | o | r ) ( G | e | e | k | s )
 \_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/   \_/ \_/ \_/ \_/ \_/ 

 
Code #14: Text in bubblehead font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks For Geeks", font = "bulbhead" )
print(result)

chevron_right


Output:

  ___  ____  ____  _  _  ___    ____  _____  ____ 
 / __)( ___)( ___)( )/ )/ __)  ( ___)(  _  )(  _ \
( (_-. )__)  )__)  )  ( \__ \   )__)  )(_)(  )   /
 \___/(____)(____)(_)\_)(___/  (__)  (_____)(_)\_)
  ___  ____  ____  _  _  ___ 
 / __)( ___)( ___)( )/ )/ __)
( (_-. )__)  )__)  )  ( \__ \
 \___/(____)(____)(_)\_)(___/

 
Code #15: Text in digital font

filter_none

edit
close

play_arrow

link
brightness_4
code

# import pyfiglet module
import pyfiglet
  
result = pyfiglet.figlet_format("Geeks For Geeks", font = "digital" )
print(result)

chevron_right


Output:

+-+-+-+-+-+ +-+-+-+ +-+-+-+-+-+
|G|e|e|k|s| |F|o|r| |G|e|e|k|s|
+-+-+-+-+-+ +-+-+-+ +-+-+-+-+-+



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.