test
This commit is contained in:
parent
5e2ecbe419
commit
9442d7e8d1
@ -11,7 +11,7 @@ os_name = platform.system()
|
||||
def font_exists(font_name):
|
||||
return any(font_name in f.name for f in fm.fontManager.ttflist)
|
||||
|
||||
font_name = 'NanumGothic'
|
||||
font_name = 'Nanum Gothic'
|
||||
if os_name == 'Darwin': # in case of MacOS
|
||||
if font_exists('AppleGothic'):
|
||||
font_name = 'AppleGothic'
|
||||
@ -38,7 +38,7 @@ def install_font(os_name, font_name):
|
||||
pass
|
||||
|
||||
|
||||
rc('font', family=font_name)
|
||||
rc('font', family='Nanum Gothic')
|
||||
plt.rcParams['axes.unicode_minus'] = False
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,8 @@ def extract_zip(file_path, extract_to):
|
||||
|
||||
def install_fonts(font_dir):
|
||||
"""Install fonts into macOS Font Book directory."""
|
||||
font_book_dir = Path.home() / "Library/Fonts"
|
||||
# font_book_dir = Path.home() / "Library/Fonts"
|
||||
font_book_dir = "/Library/Fonts"
|
||||
print(f"Installing fonts to {font_book_dir}...")
|
||||
for font_file in Path(font_dir).glob("*.ttf"):
|
||||
shutil.copy(font_file, font_book_dir)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user