8000 Embed only first font · matplotlib/matplotlib@9d78831 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d78831

Browse files
committed
Embed only first font
1 parent af4cef6 commit 9d78831

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/font_manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,9 @@ def addfont(self, path):
10981098
def defaultFont(self):
10991099
# Lazily evaluated (findfont then caches the result) to avoid including
11001100
# the venv path in the json serialization.
1101-
return {ext: self.findfont(family, fontext=ext)
1101+
1102+
# TODO: allow embedding multiple fonts
1103+
return {ext: next(iter(self.findfont(family, fontext=ext).values()))
11021104
for ext, family in self.defaultFamily.items()}
11031105

11041106
def get_default_weight(self):

0 commit comments

Comments
 (0)
0