def METHOD_NAME(target_dir):
  if (not op.isdir(target_dir)):
    os.makedirs(target_dir)
  for relative_path in ["gui_resources/ucs-fonts", "ucs-fonts"]:
    ucs_fonts_dir = libtbx.env.find_in_repositories(
      relative_path=relative_path, test=op.isdir, optional=True)
    if (ucs_fonts_dir is not None):
      break
  else:
    raise RuntimeError("Cannot find ucs-fonts directory.")
  done_flag_file = op.join(target_dir, "FONTS_UCS_DONE_FLAG_FILE")
  if (op.isfile(done_flag_file)):
    print("      Info: Re-using existing font cpp files.")
    print("      Hint: Remove %s" % op.join(
      op.basename(target_dir), op.basename(done_flag_file)))
    print("            to force generation of new font files.")
    return
  print("      fonts:", end=' ')
  for font_info in font_infos:
    print(font_info.short_name, end=' ')
    sys.stdout.flush()
    convert(
      ucs_fonts_dir=ucs_fonts_dir, target_dir=target_dir, font_info=font_info)
  open(done_flag_file, "w")
  print()