Is it possible to remove/edit the metadata in fontforge

1.6k views Asked by At

I have something like this that is converting fonts

i=1
while ( i<$argc )
  Open($argv[i])
  # edit meta somehow
  Generate($argv[i]:r + type)
  i = i+1
endloop

that prints this metadata

Created by FontForge 20141024 at Wed Nov 12 16:59:42 2014
 By Jimmy Wärting

that i would like to remove or change

1

There are 1 answers

0
Irina Makarushko On

You can use built-in function SetFontNames.

It has such signature:

SetFontNames(fontname[,family[,fullname[,weight[,copyright-notice[,fontversion]]]]])

i=1
while ( i<$argc )
  Open($argv[i])
  #edit meta
  SetFontNames('fontName', 'fontFamilyName', 'fullName', 'weight', 
'copyright', 'version')
  Generate($argv[i]:r + type)
  i = i+1
endloop

If some parameters are not necessary, just write empty string:

 SetFontNames('', '', '', '', 'copyright', 'version')

For more details, please, see https://fontforge.github.io/scripting-alpha.html