Ask coding questions

← Back to all posts
How do you change fonts for output in Python?
JosephSanthosh (1196)

How do you change fonts for output in Python? Please could someone tell me and not send links. Thanks

Answered by Bookie0 (5971) [earned 5 cycles]
View Answer
Comments
hotnewtop
Bookie0 (5971)

you can not change your font on the console for python. However, you can copy paste a font from somwhere else (which is what i did):

i copied this ^^^ (from here: https://lingojam.com/CoolTextFonts)

then printed it here:

and it works

repl link: https://repl.it/@Bookie0/test-fonts#main.py


you can do this with several fonts:

JosephSanthosh (1196)

OOH! That's what I've been trying to do!!!! THANKS @Bookie0

AnnieBan22 (1)

Use something like http://cooltextgenerator.io. Just type in your text and there will be a bunch of 'fancy' text options.

DynamicSquid (4631)

Adding on to bookies point, make a function like:

font1 = "[alphabet in another font]"

def print_font1(text):
  for c in text:
    print(font1[ord(c) - ord('a')])

in theory it should work, but for lowercase only.