From 72543ffc395e551cbb5d5669aaacbbe76227d749 Mon Sep 17 00:00:00 2001 From: Oleksii Shytikov Date: Sun, 19 Feb 2023 10:51:34 +0100 Subject: [PATCH] #3: removing punctuation patch --- punctuation.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 punctuation.py diff --git a/punctuation.py b/punctuation.py deleted file mode 100644 index b4ba6db..0000000 --- a/punctuation.py +++ /dev/null @@ -1,39 +0,0 @@ -import sys -import fontforge - -if len(sys.argv) < 2: - print("Please provide path prefix of the font to update!") - exit() - -prefix = sys.argv[1] - -glyphs = [ - "colon", - "comma", - "period", - "semicolon", -] - -pairs = [ - ['regular', 'semibold'], - ['italic', 'semibolditalic'], - ['bold', 'black'], - ['bolditalic', 'blackitalic'], -] - -for [recipient, donor] in pairs: - font = f"{prefix}-{recipient}.ttf" - - target = fontforge.open(font) - # Finding all punctuation - target.selection.select(*glyphs) - # and deleting it to make space - for i in target.selection.byGlyphs: - target.removeGlyph(i) - - source = fontforge.open(f"{prefix}-{donor}.ttf") - source.selection.select(*glyphs) - source.copy() - target.paste() - - target.generate(font)