diff options
author | Georg Brandl <georg@python.org> | 2020-09-20 08:27:56 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2020-09-20 08:27:56 +0200 |
commit | 45b3dc6891c6ece14e0ea5e017624fef36c6beea (patch) | |
tree | 58464d0fd4734a28c7e05528a4f4388d1e395095 /pygments | |
parent | e631a9ca05ab9394107f7e7447c45ed93c133aa9 (diff) | |
download | pygments-git-45b3dc6891c6ece14e0ea5e017624fef36c6beea.tar.gz |
image formatter: find ttc fonts on Mac
fixes #1223
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/formatters/img.py | 3 |
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) |