Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to remove/edit the metadata in fontforge

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

like image 597
Endless Avatar asked Jan 17 '26 09:01

Endless


1 Answers

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

like image 62
Irina Makarushko Avatar answered Jan 21 '26 08:01

Irina Makarushko