sepandhaghighi / art

🎨 ASCII art library for Python

Home Page:https://www.ascii-art.site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I get the font type for each randomly generated image.

99Kies opened this issue · comments

Description

How do I get the font type for each randomly generated image.

Steps/Code to Reproduce

tprint('openhackathon', font='random')

Expected Behavior

Actual Behavior

Operating System

Python Version

ART Version (Use : art.__version__)

Thank you for opening this issue 👍
I think it may bother users who don't care about the font name but as you said it might be useful if we add a flag to tprint function which is use for the case we want to know about font name.
show_font_name is my preferred bool flag name and it may works like this:

>>> tprint('openhackathon', font='random', show_font_name=True)
#font name : ...
openhackathon

What do you think @sepandhaghighi ?
Do you want to handle this issue @99Kies ?

Thank you for opening this issue 👍
I think it may bother users who don't care about the font name but as you said it might be useful if we add a flag to tprint function which is use for the case we want to know about font name.
show_font_name is my preferred bool flag name and it may works like this:

>>> tprint('openhackathon', font='random', show_font_name=True)
#font name : ...
openhackathon

What do you think @sepandhaghighi ?
Do you want to handle this issue @99Kies ?

it would be nice to have this as an option, which is very convenient for me to find my favorite "font" in "random".

yes, let me try
#125

@sadrasabouri Hi
I never thought anyone request this :D
But there is no problem, LGTM ;-)

yes, let me try
#125

@99Kies
Thanks for your contributing 🥇
I review your PR and left some comments there, please follow them.
Implementation of this feature is straight forward 💯

Best Regards
Sepand Haghighi

Hi @99Kies
You can test bellow script to find out which font best suits you: (change k to find more fonts)

>>> from art import *
>>> import random
>>> random_fonts = random.choices(FONT_NAMES, k=10)
>>> for font in random_fonts:
...     print("Font: {}".format(font))
...     tprint("Your test text!", font=font)
...     print('-' * 20)

Thanks for your issue and efforts for the pull request.
We decided not to implement this feature because it seems a little bit out of the art library goals.
So I'm going to close this issue after version 5.3 release.

Hi, I just got here searching for the font names but they don't seem to be on the readme. There are many fonts in random but I only found wizard as an option. BTW it seems that

tprint("SAMPLE", font="magic")
tprint("TEXT", font="wiz")

is actually random too.

Hi, I just got here searching for the font names but they don't seem to be on the readme. There are many fonts in random but I only found wizard as an option. BTW it seems that

tprint("SAMPLE", font="magic")
tprint("TEXT", font="wiz")

is actually random too.

@pbldmngz
Here you can take a look at all fonts that are supported by art : Font List

About wiz, magic and wizard (they are the same) :
This mode is also random but considers the length of input text to select a font.