Skip to content

Commit

Permalink
Updated for mixed case extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
VisLab committed Feb 26, 2024
1 parent 5e3516e commit 5010a11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hed/tools/visualization/tag_word_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def create_wordcloud(word_dict, mask_path=None, background_color=None, width=400
kwargs.setdefault('min_font_size', 8)
if 'font_path' not in kwargs:
kwargs['font_path'] = None
elif kwargs['font_path'] and not kwargs['font_path'].endswith((".ttf", ".otf", ".TTF", ".OTF")):
elif kwargs['font_path'] and not kwargs['font_path'].lower().endswith((".ttf", ".otf")):
raise HedFileError("InvalidFontPath", f"Font {kwargs['font_path']} not valid on this system", "")

wc = WordCloud(background_color=background_color, mask=mask_image,
Expand Down

0 comments on commit 5010a11

Please sign in to comment.