Python Forum

Full Version: Print text with big font and style
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[attachment=1637]
How can I print text with such font like this one on this picture?
Your support is highly appriciated in advance 🙏🙏🙏🙏
It usually called Ascii Text when get view in Terminal(command line).
Python can do better than this with the fantastic Rich✨.
Also if combine with Pyfiglet then can look like this.
[Image: k3rcat.png]
Code for this.
# pip install rich pyfiglet
import pyfiglet
from rich import print

title = pyfiglet.figlet_format('Hello', font='isometric2')
print(f'[yellow]{title}[/yellow]')
Finish made fonts
That exact font is called 'ANSI Shadow' and can be found HERE
print ('██████╗  █████╗ ███████╗██╗  ██╗')
print ('██╔══██╗██╔══██╗██╔════╝██║  ██║')
print ('██████╔╝███████║███████╗███████║')
print ('██╔══██╗██╔══██║╚════██║██╔══██║')
print ('██████╔╝██║  ██║███████║██║  ██║')
print ('╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝')
print ()                                               
print ('██████╗ ███████╗██████╗ ██╗      █████╗ ███╗   ███╗')
print ('██╔══██╗██╔════╝██╔══██╗██║     ██╔══██╗████╗ ████║')
print ('██████╔╝█████╗  ██║  ██║██║     ███████║██╔████╔██║')
print ('██╔══██╗██╔══╝  ██║  ██║██║     ██╔══██║██║╚██╔╝██║')
print ('██████╔╝███████╗██████╔╝███████╗██║  ██║██║ ╚═╝ ██║')
The same with less noise in the code
print('''\
██████╗  █████╗ ███████╗██╗  ██╗
██╔══██╗██╔══██╗██╔════╝██║  ██║
██████╔╝███████║███████╗███████║
██╔══██╗██╔══██║╚════██║██╔══██║
██████╔╝██║  ██║███████║██║  ██║
╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝
                                            
██████╗ ███████╗██████╗ ██╗      █████╗ ███╗   ███╗
██╔══██╗██╔════╝██╔══██╗██║     ██╔══██╗████╗ ████║
██████╔╝█████╗  ██║  ██║██║     ███████║██╔████╔██║
██╔══██╗██╔══╝  ██║  ██║██║     ██╔══██║██║╚██╔╝██║
██████╔╝███████╗██████╔╝███████╗██║  ██║██║ ╚═╝ ██║''')
One more with Rich,just look at my list of color combination that is accepted 🌞
Rich is something special and i heard that Will McGugan took a year off to work on Rich and Textual.
from rich import print

font = '''\
██████╗  █████╗ ███████╗██╗  ██╗
██╔══██╗██╔══██╗██╔════╝██║  ██║
██████╔╝███████║███████╗███████║
██╔══██╗██╔══██║╚════██║██╔══██║
██████╔╝██║  ██║███████║██║  ██║
╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝

██████╗ ███████╗██████╗ ██╗      █████╗ ███╗   ███╗
██╔══██╗██╔════╝██╔══██╗██║     ██╔══██╗████╗ ████║
██████╔╝█████╗  ██║  ██║██║     ███████║██╔████╔██║
██╔══██╗██╔══╝  ██║  ██║██║     ██╔══██║██║╚██╔╝██║
██████╔╝███████╗██████╔╝███████╗██║  ██║██║ ╚═╝ ██║
╚═════╝ ╚══════╝╚═════╝ ╚══════╝╚═╝  ╚═╝╚═╝     ╚═╝'''

colors = ['cornflower_blue', 'rgb(175,0,255)', 'yellow on blue', '#38761d on #a64d79']
for color in colors:
    print(f'[{color}]{font}[/{color}]')
[Image: cH4RoJ.png]
Thank you all for your support, I'm checking right now👍🙏🙏🙏🙏🙏🙏🙏
(Mar-02-2022, 03:28 AM)tomtom Wrote: [ -> ]How can I print text with such Link Removed like this one on this picture?
Your support is highly appriciated in advance 🙏🙏🙏🙏

Was your problem solved?