summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2020-09-20 08:27:56 +0200
committerGeorg Brandl <georg@python.org>2020-09-20 08:27:56 +0200
commit45b3dc6891c6ece14e0ea5e017624fef36c6beea (patch)
tree58464d0fd4734a28c7e05528a4f4388d1e395095 /pygments
parente631a9ca05ab9394107f7e7447c45ed93c133aa9 (diff)
downloadpygments-git-45b3dc6891c6ece14e0ea5e017624fef36c6beea.tar.gz
image formatter: find ttc fonts on Mac
fixes #1223
Diffstat (limited to 'pygments')
-rw-r--r--pygments/formatters/img.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/formatters/img.py b/pygments/formatters/img.py
index aa4cf35e..6a9a1eb8 100644
--- a/pygments/formatters/img.py
+++ b/pygments/formatters/img.py
@@ -126,7 +126,8 @@ class FontManager:
'/Library/Fonts/', '/System/Library/Fonts/'):
font_map.update(
(os.path.splitext(f)[0].lower(), os.path.join(font_dir, f))
- for f in os.listdir(font_dir) if f.lower().endswith('ttf'))
+ for f in os.listdir(font_dir)
+ if f.lower().endswith(('ttf', 'ttc')))
for name in STYLES['NORMAL']:
path = self._get_mac_font_path(font_map, self.font_name, name)