From 188420965806b369d031676bd43ac576bfad2815 Mon Sep 17 00:00:00 2001 From: Eli Gao Date: Tue, 1 Aug 2023 15:02:55 +0000 Subject: [PATCH] style: cleanup and format --- src/generate.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/generate.py b/src/generate.py index 8e23d42..2751bb6 100644 --- a/src/generate.py +++ b/src/generate.py @@ -8,7 +8,6 @@ from LETTERS import LETTERS -FONT_SIZE = 650 FONT_FILE = 'assets/三极隶书简体.ttf' OUTPUT_DIR = 'dist' @@ -18,8 +17,6 @@ os.makedirs(SMALL_SUBDIR, exist_ok=True) os.makedirs(LARGE_SUBDIR, exist_ok=True) -CANVAS_SIZE = 1000 - def main() -> None: i = 0 @@ -32,7 +29,7 @@ def main() -> None: xform = transform.Identity.translate( (1000-svgPerEm)/2, svgPerEm).scale(svgPerEm, -svgPerEm).transform(ttf2em) glyphSet = font.getGlyphSet() - + for letter in LETTERS: i += 1 pen = SVGPathPen(glyphSet) @@ -43,7 +40,7 @@ def main() -> None: glyph.draw(tpen) pen.closePath() path = pen.getCommands() - + # TODO: extract to function dwg = svgwrite.Drawing( f'{SMALL_SUBDIR}/{i:03d}_{letter}.svg', size=(100, 100))