Skip to content

Commit

Permalink
manrope
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleclo committed Dec 18, 2024
1 parent 09a1971 commit 6e00d89
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions scripts/flops_by_perf_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,37 @@
"""

# First clear any existing font cache
import shutil

import matplotlib as mpl
import matplotlib.font_manager as fm
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties

# Find path to Manrope font on your computer
# fonts = [f for f in fm.findSystemFonts()]
# manrope_fonts = [f for f in fonts if "manrope" in f.lower()]
# for font in manrope_fonts:
# print(font)


cache_dir = mpl.get_cachedir()
shutil.rmtree(cache_dir)

# Load the font file
font_path = "/Users/kylel/Library/Fonts/Manrope-VariableFont_wght.ttf"
font_prop = FontProperties(fname=font_path)


# Try setting weight after creation
font_prop.set_weight(500)


# Set it globally using the font property
plt.rcParams["font.family"] = "sans-serif"
plt.rcParams["font.sans-serif"] = [font_prop.get_name()]

import numpy as np
import pandas as pd

Expand Down

0 comments on commit 6e00d89

Please sign in to comment.