Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Issues Fixed #178

Merged
merged 8 commits into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Changed
- `test.py` modified
- `font_wizard.py` modified
### Removed
- `greetings.yml`
## [5.3] - 2021-08-30
Expand Down
2 changes: 1 addition & 1 deletion art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def __word2art(word, font, chr_ignore, letters, next_word, sep="\n"):
return ""
for i in range(len(split_list[0])):
temp = ""
for j,item in enumerate(split_list):
for j, item in enumerate(split_list):
if j > 0 and (
i == 1 or i == len(
split_list[0]) -
Expand Down
2 changes: 1 addition & 1 deletion art/art_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@
"manga": [manga_dic, False],
"upside_down2": [upside_down2_dic, False],
"cool": [cool_dic, False],
"instagram":[instagram_dic, False]
"instagram": [instagram_dic, False]
}

DECORATIONS_MAP = {"angry1": angry1, # pragma: no cover
Expand Down
4 changes: 2 additions & 2 deletions art/text_dic3.py
Original file line number Diff line number Diff line change
Expand Up @@ -26336,7 +26336,7 @@
'8': '8',
'9': '9',
' ': ' '}
instagram_dic = {
instagram_dic = {
'a': '🅐',
'b': '🅑',
'c': '🅒',
Expand Down Expand Up @@ -26431,4 +26431,4 @@
'7': '❼',
'8': '❽',
'9': '❾',
' ': ' '}
' ': ' '}
29 changes: 28 additions & 1 deletion otherfile/font_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,38 @@
Letters = string.ascii_letters + string.punctuation + string.digits
Font_List = list(art.art_param.FONT_MAP.keys())

INVALID_FONT_NAME = [
sepandhaghighi marked this conversation as resolved.
Show resolved Hide resolved
"mix",
"wizard",
"wiz",
"magic",
"random",
"random-na",
"random-xlarge",
"random-large",
"random-medium",
"random-small",
"rand",
"rand-na",
"rand-xlarge",
"rand-large",
"rand-medium",
"rand-small",
"rnd",
"rnd-na",
"rnd-xlarge",
"rnd-large",
"rnd-medium",
"rnd-small"]

Error1 = "[Error] Font data is empty!"
Error2 = "[Error] Font should support 95 printable ASCII characters, please check font data!"
Error3 = "[Error] Font duplication (art version : {}) -- > ".format(
art.__version__)
Error4 = "[Error] All letters should have same height"
Error5 = "[Error] Font should be compatible with UTF-8"
Error6 = "[Error] This font name is not available"
Error7 = "[Error] Do not use these font names : {}".format(INVALID_FONT_NAME)


def is_utf8(s):
Expand Down Expand Up @@ -58,7 +83,9 @@ def is_ascii(s):
font_name = input("Please enter font name : ")
if font_name in Font_List:
print(Error6)
else:
elif font_name in INVALID_FONT_NAME:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

font_name.lower() ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. You are right.

print(Error7)
else:
break
font_data = input("Please enter font data (string or list) : ")
if not is_utf8(font_data):
Expand Down