mirror of
https://gitlab.constantvzw.org/osp/tools.cobbled-paths.git
synced 2024-12-21 12:10:48 +01:00
Script to generate glyph entries for a Figlet Font
This commit is contained in:
parent
128edf7f40
commit
0881160719
30
scripts/make_flf.py
Normal file
30
scripts/make_flf.py
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user