From f49b92cb6c59765a903b03bd30264b5ff368393a Mon Sep 17 00:00:00 2001 From: Ryan L McIntyre Date: Fri, 5 Jul 2019 12:32:06 -0700 Subject: [PATCH] Resolves conflicts --- font-patcher | 53 +++++++++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/font-patcher b/font-patcher index 8bd6a7c4b..1f84a30d0 100755 --- a/font-patcher +++ b/font-patcher @@ -305,40 +305,25 @@ class font_patcher: # the same name as the same font, even if subFamily is different. fontname += '-' + subFamily -# rename font - -def replace_all(text, dic): - for i, j in dic.items(): - text = text.replace(i, j) - return text - - -def make_sure_path_exists(path): - try: - os.makedirs(path) - except OSError as exception: - if exception.errno != errno.EEXIST: - raise - -make_sure_path_exists(args.outputdir) - -# comply with SIL Open Font License (OFL) -reservedFontNameReplacements = { - 'source' : 'sauce', - 'Source' : 'Sauce', - 'hermit' : 'hurmit', - 'Hermit' : 'Hurmit', - 'hasklig' : 'hasklug', - 'Hasklig' : 'Hasklug', - 'Share' : 'Shure', - 'share' : 'shure', - 'IBMPlex' : 'Blex', - 'ibmplex' : 'blex', - 'IBM-Plex': 'Blex', - 'IBM Plex': 'Blex', - 'terminus': 'terminess', - 'Terminus': 'Terminess' -} + # rename font + # + # comply with SIL Open Font License (OFL) + reservedFontNameReplacements = { + 'source' : 'sauce', + 'Source' : 'Sauce', + 'hermit' : 'hurmit', + 'Hermit' : 'Hurmit', + 'hasklig' : 'hasklug', + 'Hasklig' : 'Hasklug', + 'Share' : 'Shure', + 'share' : 'shure', + 'IBMPlex' : 'Blex', + 'ibmplex' : 'blex', + 'IBM-Plex': 'Blex', + 'IBM Plex': 'Blex', + 'terminus': 'terminess', + 'Terminus': 'Terminess' + } # remove overly verbose font names # particularly regarding Powerline sourced Fonts (https://github.com/powerline/fonts)