summaryrefslogtreecommitdiff
path: root/fonts/gentium-tug/source/type1/afmcreator.py
blob: bc44f1cd85953046ee7bd602337446b639bb7304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/env python
# This file is part of the Gentium package for TeX.
# It is licensed under the Expat License, see doc//README for details.

import os, sys

creatortext = "Comment Creator: TeX Users Group\n"

tempname = "temp.afm"

fin = open(sys.argv[1], "r")
fout = open(tempname, "w")
while True:
  s = fin.readline()
  if s == "": break	# end of file
  fout.write(s)
  if s.find("Comment Creation Date") == 0 :
    fout.write(creatortext) # Creator after Creation Date
fin.close()
fout.close()

os.rename(tempname, sys.argv[1])