From 08811607199b3a506ae67d2743967583d629d756 Mon Sep 17 00:00:00 2001 From: Gijs Date: Sat, 8 Jun 2024 15:37:37 +0200 Subject: [PATCH] Script to generate glyph entries for a Figlet Font --- scripts/make_flf.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scripts/make_flf.py diff --git a/scripts/make_flf.py b/scripts/make_flf.py new file mode 100644 index 0000000..750a103 --- /dev/null +++ b/scripts/make_flf.py @@ -0,0 +1,30 @@ +import sys + +""" + Generates glyphs entries for an FLF file. + It does not generate the file header. + + Run like: make_flf.py [glyph_height] +""" + +height = int(sys.argv[1]) + +flf = '' + +for chr_code in range(32, 126): + for line in range(height): + flf += " " + + if line == 0: + flf += chr(chr_code) + else: + flf += " " + + flf += "@" + + if line == height-1: + flf += "@" + + flf += "\n" + +print(flf) \ No newline at end of file