Skip to content

Commit

Permalink
font_size_splitter reproducibility bug (#259)
Browse files Browse the repository at this point in the history
* fix : `font_size_splitter` reproducibility problem.

* log : changes logged.
  • Loading branch information
sadrasabouri authored Sep 10, 2023
1 parent fcce761 commit 8c005b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Changed
- `font_size_splitter` function modified
- `__detailed_return` parameter added to `art` function
- `__detailed_return` parameter added to `text2art` function
- Random mode name bug fixed
Expand Down
7 changes: 2 additions & 5 deletions art/art.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ def font_size_splitter(font_map):
:type font_map : dict
:return: splitted fonts as dict
"""
small_font = []
medium_font = []
large_font = []
xlarge_font = []
small_font, medium_font, large_font, xlarge_font = [], [], [], []
fonts = set(font_map) - set(RANDOM_FILTERED_FONTS)
for font in fonts:
for font in sorted(fonts):
length = max(len(x) for x in font_map[font][0].values())
if length <= FONT_SMALL_THRESHOLD:
small_font.append(font)
Expand Down

0 comments on commit 8c005b6

Please sign in to comment.