remove old implementation of check 065
@@ -243,52 +243,6 @@ def perform_all_fontforge_checks(fb, validation_state):
"Hinds do not overlap.")
-def check_nonligated_sequences_kerning_info(fb, font, has_kerning_info):
- ''' Fonts with ligatures should have kerning on the corresponding
- non-ligated sequences for text where ligatures aren't used.
- '''
- fb.new_check("065", "Is there kerning info for non-ligated sequences?")
- if has_kerning_info is False:
- fb.skip("This font lacks kerning info.")
- else:
- all_ligatures = get_all_ligatures(font)
-
- def look_for_nonligated_kern_info(table):
- for pairpos in table.SubTable:
- for i, glyph in enumerate(pairpos.Coverage.glyphs):
- if glyph in all_ligatures.keys():
- try:
- for pairvalue in pairpos.PairSet[i].PairValueRecord:
- if pairvalue.SecondGlyph in all_ligatures[glyph]:
- del all_ligatures[glyph]
- except:
- # Sometimes for unknown reason an exception
- # is raised for accessing pairpos.PairSet
- pass
-
- for lookup in font["GPOS"].table.LookupList.Lookup:
- if lookup.LookupType == 2: # type 2 = Pair Adjustment
- look_for_nonligated_kern_info(lookup)
- # elif lookup.LookupType == 9:
- # if lookup.SubTable[0].ExtensionLookupType == 2:
- # look_for_nonligated_kern_info(lookup.SubTable[0])
-
- def ligatures_str(ligatures):
- result = []
- for first in ligatures:
- result.extend(["{}_{}".format(first, second)
- for second in ligatures[first]])
- return result
-
- if all_ligatures != {}:
- fb.error(("GPOS table lacks kerning info for the following"
- " non-ligated sequences: "
- "{}").format(ligatures_str(all_ligatures)))
- else:
- fb.ok("GPOS table provides kerning info for "
- "all non-ligated sequences.")
-
-
def check_there_is_no_KERN_table_in_the_font(fb, font):
"""Fonts should have their kerning implemented in the GPOS table"""
fb.new_check("066", "Is there a 'KERN' table declared in the font?")
