#!/usr/bin/env python

import sys

if __name__ == "__main__":

  if not sys.argv[2:]:
    print "Usage: txt2header <input file> <output file>"

  print "Generating '%s' from '%s'" % (sys.argv[2], sys.argv[1])
  fp = file(sys.argv[2], "wb")

  fp.write("const char* g_FontData =")
  # could be greatly compressed.
  for i in file(sys.argv[1],"rb").readlines():
    txt = i.strip()
    fp.write('"' + txt + '"\n')

  fp.write(";")


