(self, family=None, style=None, variant=None, weight=None,
stretch=None, size=None,
fname=None, # if set, it's a hardcoded filename to use
math_fontfamily=None)
| 816 | |
| 817 | @_cleanup_fontproperties_init |
| 818 | def __init__(self, family=None, style=None, variant=None, weight=None, |
| 819 | stretch=None, size=None, |
| 820 | fname=None, # if set, it's a hardcoded filename to use |
| 821 | math_fontfamily=None): |
| 822 | self.set_family(family) |
| 823 | self.set_style(style) |
| 824 | self.set_variant(variant) |
| 825 | self.set_weight(weight) |
| 826 | self.set_stretch(stretch) |
| 827 | self.set_file(fname) |
| 828 | self.set_size(size) |
| 829 | self.set_math_fontfamily(math_fontfamily) |
| 830 | # Treat family as a fontconfig pattern if it is the only parameter |
| 831 | # provided. Even in that case, call the other setters first to set |
| 832 | # attributes not specified by the pattern to the rcParams defaults. |
| 833 | if (isinstance(family, str) |
| 834 | and style is None and variant is None and weight is None |
| 835 | and stretch is None and size is None and fname is None): |
| 836 | self.set_fontconfig_pattern(family) |
| 837 | |
| 838 | @classmethod |
| 839 | def _from_any(cls, arg): |
nothing calls this directly
no test coverage detected