/usr/bin/fontlint is in fontforge 20120731.b-5.
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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | #!/usr/bin/fontforge -lang=ff
if ( Strtol($version)<20070924 )
Error( "Please upgrade to a more recent version of fontforge" )
endif
if ( $argc <= 1 )
Print( "fontlint: {fontfile}" )
Print( " Validates the listed fonts" )
return( 1 );
endif
while ( $argc > 1 )
Open( $1, 9 ) /* Open even if fstype objects, turn on validation */
mask = Validate()
blues = $privateState
if ( $order==2 )
blues = blues & ~0x010000;
else
mask = mask & ~0x80000;
endif
if ( mask==0 && $loadState==0 && blues==0 )
Print("Validation " + $fontname + " ...Passed")
else
Print("Validation " + $fontname + " ...Failed")
if ( mask & 0x2 )
Print( " Open Contour" )
endif
if ( mask & 0x4 )
Print( " Self Intersecting Glyph" )
endif
if ( mask & 0x8 )
Print( " Wrong Direction" )
endif
if ( mask & 0x10 )
Print( " Flipped Reference" )
endif
if ( mask & 0x20 )
Print( " Missing Points at Extrema" )
endif
if ( mask & 0x40 )
Print( " Unknown glyph referenced in GSUB/GPOS/MATH" )
endif
if ( mask & 0x80 )
Print( " More points in a glyph than PostScript allows" )
endif
if ( mask & 0x100 )
Print( " Too Many Hints" )
endif
if ( mask & 0x200 )
Print( " Bad Glyph Name" )
endif
if ( mask & 0x400 )
Print( " More points in a glyph than specified in 'maxp'" )
endif
if ( mask & 0x800 )
Print( " More paths in a glyph than specified in 'maxp'" )
endif
if ( mask & 0x1000 )
Print( " More points in a composite glyph than specified in 'maxp'" )
endif
if ( mask & 0x2000 )
Print( " More paths in a composite glyph than specified in 'maxp'" )
endif
if ( mask & 0x4000 )
Print( " Instructions longer than allowed in 'maxp'" )
endif
if ( mask & 0x8000 )
Print( " More references in a glyph than specified in 'maxp'" )
endif
if ( mask & 0x10000 )
Print( " References nested more deeply than specified in 'maxp'" )
endif
if ( mask & 0x20000 )
# Print( " 'prep' or 'fpgm' tables are longer than specified in 'maxp'" )
#I no longer think this is an error
endif
if ( mask & 0x40000 )
Print( " Adjacent points too far apart in a glyph" )
endif
if ( mask & 0x80000 )
Print( " Non integral coordinates in a glyph" )
endif
if ( mask & 0x100000 )
Print( " A glyph uses at least one, but not all, anchor classes in a subtable" )
Print( " (I'm not absolutely sure this is an error)" )
endif
if ( mask & 0x200000 )
Print( " Two glyphs have the same name." )
endif
if ( mask & 0x400000 )
Print( " Two glyphs have the unicode." )
endif
if ( mask & 0x800000 )
Print( " Overlapping hints in a glyph." )
endif
mask = $loadState;
if ( mask & 0x01 )
Print( " Bad PostScript fontname entry in the 'name' table" )
endif
if ( mask & 0x02 )
Print( " Bad 'glyf' or 'loca' table" )
endif
if ( mask & 0x04 )
Print( " Bad 'CFF ' table" )
endif
if ( mask & 0x08 )
Print( " Bad 'hhea', 'hmtx', 'vhea' or 'vmtx' table" )
endif
if ( mask & 0x10 )
Print( " Bad 'cmap' table" )
endif
if ( mask & 0x20 )
Print( " Bad 'EBDT', 'bdat', 'EBLC' or 'bloc' (embedded bitmap) table" )
endif
if ( mask & 0x40 )
Print( " Bad Apple GX advanced typography table" )
endif
if ( mask & 0x80 )
Print( " Bad OpenType advanced typography table" )
endif
if ( mask & 0x100 )
Print( " Bad version number in OS/2 table (must be >0, and must be >1 for OT-CFF fonts)" )
endif
if ( mask & 0x200 )
Print( " Bad sfnt file header" )
endif
if ( blues & 0x010000 )
Print( " Missing BlueValues entry in PostScript Private dictionary" )
endif
if ( blues & 0x000001 )
Print( " Odd number of elements in either the BlueValues or OtherBlues entries in the PostScript Private dictionary" )
endif
if ( blues & 0x000002 )
Print( " Disordered elements in either the BlueValues or OtherBlues entries in the PostScript Private dictionary" )
endif
if ( blues & 0x000004 )
Print( " Too many elements in either the BlueValues or OtherBlues entries in the PostScript Private dictionary" )
endif
if ( blues & 0x000008 )
Print( " Elements too close in either the BlueValues or OtherBlues entries in the PostScript Private dictionary (must be at least 2*BlueFuzz+1 apart)" )
endif
if ( blues & 0x000010 )
Print( " Non-integral elements in either the BlueValues or OtherBlues entries in the PostScript Private dictionary" )
endif
if ( blues & 0x000020 )
Print( " Alignment zone height in either the BlueValues or OtherBlues is too big for the BlueScale in the PostScript Private dictionary" )
endif
if ( blues & 0x000100 )
Print( " Odd number of elements in either the FamilyBlues or FamilyOtherBlues entries in the PostScript Private dictionary" )
endif
if ( blues & 0x000200 )
Print( " Disordered elements in either the FamilyBlues or FamilyOtherBlues entries in the PostScript Private dictionary" )
endif
if ( blues & 0x000400 )
Print( " Too many elements in either the FamilyBlues or FamilyOtherBlues entries in the PostScript Private dictionary" )
endif
if ( blues & 0x000800 )
Print( " Elements too close in either the FamilyBlues or FamilyOtherBlues entries in the PostScript Private dictionary (must be at least 2*BlueFuzz+1 apart)" )
endif
if ( blues & 0x001000 )
Print( " Non-integral elements in either the FamilyBlues or FamilyOtherBlues entries in the PostScript Private dictionary" )
endif
if ( blues & 0x002000 )
Print( " Alignment zone height in either the FamilyBlues or FamilyOtherBlues is too big for the BlueScale in the PostScript Private dictionary" )
endif
if ( blues & 0x020000 )
Print( " Bad BlueFuzz entry in PostScript Private dictionary" )
endif
if ( blues & 0x040000 )
Print( " Bad BlueScale entry in PostScript Private dictionary" )
endif
if ( blues & 0x080000 )
Print( " Bad StdHW entry in PostScript Private dictionary" )
endif
if ( blues & 0x100000 )
Print( " Bad StdVW entry in PostScript Private dictionary" )
endif
if ( blues & 0x200000 )
Print( " Bad StemSnapH entry in PostScript Private dictionary" )
endif
if ( blues & 0x400000 )
Print( " Bad StemSnapV entry in PostScript Private dictionary" )
endif
if ( blues & 0x800000 )
Print( " StemSnapH does not contain StdHW value in PostScript Private dictionary" )
endif
if ( blues & 0x1000000 )
Print( " StemSnapV does not contain StdVW value in PostScript Private dictionary" )
endif
if ( blues & 0x2000000 )
Print( " Bad BlueShift entry in PostScript Private dictionary" )
endif
Quit( 1 )
endif
Close()
shift
endloop
|