Skip to content

Commit

Permalink
Merge pull request #178 from sepandhaghighi/minor_issues
Browse files Browse the repository at this point in the history
Minor Issues Fixed
  • Loading branch information
sepandhaghighi committed Sep 15, 2021
2 parents 1693570 + e7aeba4 commit d976380
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
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': '❾',
' ': ' '}
' ': ' '}
26 changes: 25 additions & 1 deletion otherfile/font_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@
Letters = string.ascii_letters + string.punctuation + string.digits
Font_List = list(art.art_param.FONT_MAP.keys())

INVALID_FONT_NAME = [
"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(
Expand Down Expand Up @@ -56,7 +80,7 @@ def is_ascii(s):
print("*" * 30)
while(True):
font_name = input("Please enter font name : ")
if font_name in Font_List:
if font_name in Font_List or font_name.lower() in INVALID_FONT_NAME:
print(Error6)
else:
break
Expand Down

0 comments on commit d976380

Please sign in to comment.