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

Skip to content

Commit df6b560

Browse files
committed
fix texmanager fontconfig to consider latex preamble
1 parent d22f626 commit df6b560

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/texmanager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ def __init__(self):
203203
'default.' % ff, 'helpful')
204204
setattr(self, font_family_attr, self.font_info[font_family])
205205
fontconfig.append(getattr(self, font_family_attr)[0])
206+
# Add a hash of the latex preamble to fontconfig
207+
preamble_bytes = six.text_type(self.get_custom_preamble()).encode('utf-8')
208+
fontconfig.append(md5(preamble_bytes).hexdigest())
206209
self._fontconfig = ''.join(fontconfig)
207210

208211
# The following packages and commands need to be included in the latex

0 commit comments

Comments
 (0)