def METHOD_NAME(ucs_fonts_dir, target_dir, font_info):
  bdf_file = open(op.join(ucs_fonts_dir, font_info.file_name))
  full_name = None
  number_of_chars = None
  for line in bdf_file:
    if (line.startswith("FONT ")):
      assert full_name is None
      fields = line.split()
      assert len(fields) == 2
      full_name=fields[1]
    if (line.startswith("CHARS ")):
      assert number_of_chars is None
      fields = line.split()
      assert len(fields) == 2
      number_of_chars = int(fields[1])
      break
  assert full_name is not None
  assert number_of_chars is not None
  bitmaps = []
  while True:
    bitmap = read_bitmap(bdf_file=bdf_file)
    if (bitmap.label is None):
      break
    bitmaps.append(bitmap)
  assert len(bitmaps) == number_of_chars
  char_records = [bitmap.format_cpp() for bitmap in bitmaps]
  cpp_file_name = op.join(target_dir, "font_ucs_%s.cpp" % font_info.short_name)
  open(cpp_file_name, "w").write(
    format_font_ucs_cpp(
      short_name=font_info.short_name,
      full_name=full_name,
      width=font_info.width,
      height=font_info.height,
      xorig=font_info.xorig,
      yorig=font_info.yorig,
      char_records=char_records,
      encoding_ranges=encoding_ranges(bitmaps=bitmaps).format_cpp()))