Skip to content
Browse files

scripts: gen_cfb_font_header: remove guard and make font data private

The output of this script is intended to be put into an implementation
file, where the font data is accessed by index to an array maintained by
the linker script.  There is no need for protection against multiple
includes, and the font data array should not be a global symbol.

Signed-off-by: Peter A. Bigot <>
  • Loading branch information...
pabigot authored and galak committed Jul 18, 2019
1 parent 1090dbc commit f14b19b00aabdad232241c39bd7a8bf13f3cbd70
Showing with 3 additions and 11 deletions.
  1. +3 −11 scripts/
@@ -65,8 +65,6 @@ def extract_image_glyphs():

def generate_header():
"""Generate CFB font header file"""
guard = "__CFB_FONT_{:s}_{:d}{:d}_H__".format(, args.width,

zephyr_base = os.environ.get('ZEPHYR_BASE', "")

@@ -89,15 +87,11 @@ def generate_header():
#ifndef {guard}
#define {guard}
#include <zephyr.h>
#include <display/cfb.h>
const u8_t cfb_font_{name:s}_{width:d}{height:d}[{elem:d}][{b:.0f}] = {{\n"""
static const u8_t cfb_font_{name:s}_{width:d}{height:d}[{elem:d}][{b:.0f}] = {{\n"""
.format(cmd=" ".join(clean_cmd),
@@ -124,10 +118,8 @@ def generate_header():
#endif /* {guard} */""" .format(, width=args.width,
height=args.height, first=args.first,
last=args.last, guard=guard))
""" .format(, width=args.width, height=args.height,
first=args.first, last=args.last))

def parse_args():
"""Parse arguments"""

0 comments on commit f14b19b

Please sign in to comment.
You can’t perform that action at this time.