Skip to content

Commit

Permalink
Add potential fix for linux font paths for #628 and #604.
Browse files Browse the repository at this point in the history
  • Loading branch information
FormerLurker committed Nov 21, 2020
1 parent 88aa71f commit 5a4b744
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions octoprint_octolapse/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,9 @@ def get_system_fonts(base_directory):

if sys.platform == "linux" or sys.platform == "linux2" or sys.platform == "darwin":
# Linux and OS X.
linux_font_paths = subprocess.check_output("fc-list --format %{file}\\n".split()).split('\n')
# linux_font_paths = subprocess.check_output("fc-list --format %{file}\\n".split()).split('\n')
linux_font_paths = str(subprocess.check_output(["fc-list", "--format", "%{file}\n"]), 'UTF-8').split('\n')
linux_font_paths = list(filter(None, linux_font_paths))
for f in linux_font_paths:
font_name = os.path.basename(f)
if not font_name in font_names:
Expand All @@ -680,8 +682,6 @@ def get_system_fonts(base_directory):
return font_paths




def get_directory_size(root, recurse=False):
total_size = 0
try:
Expand Down

0 comments on commit 5a4b744

Please sign in to comment.