We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d37551a + fa4ae59 commit 36c6632Copy full SHA for 36c6632
lib/matplotlib/texmanager.py
@@ -110,12 +110,12 @@ def get_font_config(self):
110
111
# The following packages and commands need to be included in the latex
112
# file's preamble:
113
- cmd = [fonts['serif'][1],
114
- fonts['sans-serif'][1],
115
- fonts['monospace'][1]]
+ cmd = {fonts[family][1]
+ for family in ['serif', 'sans-serif', 'monospace']}
116
if self.font_family == 'cursive':
117
- cmd.append(fonts['cursive'][1])
118
- self._font_preamble = '\n'.join([r'\usepackage{type1cm}', *cmd])
+ cmd.add(fonts['cursive'][1])
+ cmd.add(r'\usepackage{type1cm}')
+ self._font_preamble = '\n'.join(sorted(cmd))
119
120
return ''.join(fontconfig)
121
0 commit comments