Lines Matching refs:args
23 if args.dump:
24 blackwhite.save("{}_{}.png".format(args.name, charcode))
31 args.output.write("""\t/* {:d}{} */\n\t{{\n""".format(charcode, char))
34 if args.hpack:
61 args.output.write("\t\t")
65 if not args.msb_first:
67 args.output.write("0x{:02x},".format(int(value, 2)))
68 args.output.write(" /* {} */\n".format(''.join(bits).replace('0', ' ').replace('1', '#')))
69 args.output.write("\t},\n")
73 font = ImageFont.truetype(args.input, args.size)
78 for i in range(args.first, args.last + 1):
92 if args.hpack:
94 height = fh_max + args.y_offset
97 height = 8 * int((fh_max + args.y_offset + 7) / 8)
100 if width != args.width:
101 raise Exception('text width {} mismatch with -x {}'.format(width, args.width))
102 if height != args.height:
103 raise Exception('text height {} mismatch with -y {}'.format(height, args.height))
105 for i in range(args.first, args.last + 1):
117 if args.center_x:
119 ypos = args.y_offset
126 image = Image.open(args.input)
129 for i in range(args.first, args.last + 1):
130 glyph = image.crop((x_offset, 0, x_offset + args.width, args.height))
132 x_offset += args.width
138 if args.hpack:
142 if args.msb_first:
151 if args.bindir and arg.startswith(args.bindir):
153 striplen = min(len(args.bindir)+1, len(arg))
157 if args.zephyr_base is not None:
158 clean_cmd.append(arg.replace(args.zephyr_base, '"${ZEPHYR_BASE}"'))
163 args.output.write("""/*
174 name=args.name,
175 width=args.width,
176 height=args.height,
177 elem=args.last - args.first + 1,
178 b=args.width / 8 * args.height))
180 if args.type == "font":
182 elif args.type == "image":
184 elif args.input.name.lower().endswith((".otf", ".otc", ".ttf", ".ttc")):
189 args.output.write("""
200 """ .format(name=args.name, width=args.width, height=args.height,
201 caps=caps, first=args.first, last=args.last))
205 global args
266 args = parser.parse_args()