/usr/bin/sfddiff is in fontforge-nox 20120731.b-5ubuntu0.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | #!/usr/bin/fontforge -lang=ff
if ( Strtol($version)<20060330 )
Error( "Please upgrade to a more recent version of fontforge" )
endif
flags=0x789
outfile=""
while ( $argc > 1 && Strsub($1,0,1)=="-" )
temp = $1
if ( Strsub(temp,1,2)=='-' )
temp = Strsub(temp,1)
endif
if ( temp=="-ignorehints" )
flags = flags & ~0x8
elseif ( temp=="-ignorenames" )
flags = flags & ~0x100
elseif ( temp=="-ignoregpos" )
flags = flags & ~0x200
elseif ( temp=="-ignoregsub" )
flags = flags & ~0x400
elseif ( temp=="-ignorebitmaps" )
flags = flags & ~0x80
elseif ( temp=="-exact" )
flags = flags | 0x2
elseif ( temp=="-warn" )
flags = flags | 0x44
elseif ( temp=="-merge" )
flags = flags | 0x1800
shift
outfile = $1
elseif ( temp=="-help" )
Print( "sfddiff: [--version] [--help] [--usage] [--ignorehints] [--ignorenames] [--ignoregpos] [--ignoregsup] [--ignorebitmaps] [--warn] [--exact] fontfile1 fontfile2" )
Print( " Compares two fontfiles" )
Print( " --ignorehints: Do not compare postscript hints or truetype instructions" )
Print( " --ignorenames: Do not compare font names" )
Print( " --ignoregpos: Do not compare kerning, etc." )
Print( " --ignoregsub: Do not compare ligatures, etc." )
Print( " --ignorebitmaps: Do not compare bitmap strikes" )
Print( " --exact: Normally sfddiff will match contours which are not exact" )
Print( " but where the differences are slight (so you could compare" )
Print( " truetype and postscript and get reasonable answers). Also" )
Print( " normally sfddiff will unlink references before it compares" )
Print( " (so you can compare a postscript font (with no references)" )
Print( " to the original source (which does have references)). Setting")
Print( " this flag means glyphs must match exactly.")
Print( " --warn: Provides a warning when an exact match is not found" )
Print( " --merge outfile: Put any outline differences in the backgrounds of" )
Print( " appropriate glyphs" )
return(0)
elseif ( temp=="-version" )
Print( "Version 1.0" )
return(0)
else
break
endif
shift
endloop
if ( $argc!=3 || $1=="--usage" || $1=="-usage" )
Print( "sfddiff: [--version] [--help] [--usage] [--ignorehints] [--ignorenames] [--ignoregpos] [--ignoregsup] [--ignorebitmaps] [--warn] [--exact] [--merge outfile] fontfile1 fontfile2" )
return(0)
endif
Open($2,1)
Open($1,1)
CompareFonts($2,"-",flags)
if ( outfile!="" )
Save(outfile)
endif
|