Files reorganization, bitmap fonts convertor tool, style fixes, terminus fonts
Three new fonts
This commit is contained in:
parent
861fe94bd3
commit
02da6d83a7
27 changed files with 8235 additions and 15576 deletions
|
|
@ -1,11 +1,12 @@
|
|||
#!/usr/bin/env python3
|
||||
# encoding: utf-8
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys, os
|
||||
from PIL import Image, ImageFont, ImageDraw
|
||||
import argparse
|
||||
import jinja2
|
||||
import re
|
||||
import time
|
||||
|
||||
def gen_char(index, c, im):
|
||||
bw = (im.size[0] + 7) // 8
|
||||
|
|
@ -59,7 +60,7 @@ def main(args):
|
|||
chars.append(gen_char(idx, idx + args.first, im.convert('1')))
|
||||
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.dirname(os.path.abspath(__file__))), finalize=lambda x: '' if x is None else x)
|
||||
print(env.get_template('template.c').render({
|
||||
print(env.get_template(args.template).render({
|
||||
'font': {
|
||||
'name': args.name,
|
||||
'size': size,
|
||||
|
|
@ -67,7 +68,8 @@ def main(args):
|
|||
'first': args.first,
|
||||
'last': args.last,
|
||||
},
|
||||
'chars': chars
|
||||
'chars': chars,
|
||||
'created': time.ctime()
|
||||
}))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue