Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f665b70

Browse files
committed
Fix set_name call.
svn path=/trunk/matplotlib/; revision=3795
1 parent edbc818 commit f665b70

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/matplotlib/font_manager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def __init__(self,
637637
self.__props.__dict__.update(_init)
638638
return
639639

640-
if isinstance(family, str):
640+
if is_string_like(family):
641641
# Treat family as a fontconfig pattern if it is the only
642642
# parameter provided.
643643
if (style is None and
@@ -720,8 +720,11 @@ def set_family(self, family):
720720
if family is None:
721721
self.__props.__dict__.pop('family', None)
722722
else:
723+
if is_string_like(family):
724+
family = [family]
723725
self.__props.family = family
724-
726+
set_name = set_family
727+
725728
def set_style(self, style):
726729
"""Set the font style. Values are: normal, italic or oblique."""
727730
if style is None:

0 commit comments

Comments
 (0)