-
Notifications
You must be signed in to change notification settings - Fork 790
allow to load .ttc fonts #1223
Copy link
Copy link
Closed
Labels
A-formattingarea: changes to formattersarea: changes to formattersS-minorseverity: minorseverity: minorT-featuretype: a new featuretype: a new featureX-importedimported from Bitbucketimported from Bitbucket
Milestone
Description
(Original issue 1519 created by vanyakosmos on 2019-06-01T18:04:00.912951+00:00)
formatter.img:123
instead of loading just ttf:
def _create_mac(self):
font_map = {}
for font_dir in (os.path.join(os.getenv('HOME'), 'Library/Fonts/'),
'/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')))check multiple extensions:
def _create_mac(self):
font_map = {}
for font_dir in (
os.path.join(os.getenv('HOME'), 'Library/Fonts/'),
'/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', 'ttc'))
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-formattingarea: changes to formattersarea: changes to formattersS-minorseverity: minorseverity: minorT-featuretype: a new featuretype: a new featureX-importedimported from Bitbucketimported from Bitbucket