Skip to content

Commit

Permalink
fix fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
nrennie committed Jun 26, 2024
1 parent 36ed768 commit 7b76af4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ If `'Arial'` is installed, we'll use that as the main font (`body_font`) and if
```{python}
# Check if 'Arial' in list of installed fonts
flist = ''.join(flist).lower()
if 'arial' in names:
if 'arial' in flist:
body_font = 'Arial'
else:
body_font = 'sans'
Expand Down
5 changes: 2 additions & 3 deletions plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@

# Check if 'Arial' in list of installed fonts
flist = matplotlib.font_manager.findSystemFonts()
names = [matplotlib.font_manager.FontProperties(
fname=fname).get_name() for fname in flist]
if 'Arial' in names:
flist = ''.join(flist).lower()
if 'arial' in flist:
body_font = 'Arial'
else:
body_font = 'sans'
Expand Down

0 comments on commit 7b76af4

Please sign in to comment.