Lines Matching full:groups
9 def convertUFO1OrUFO2KerningToUFO3Kerning(kerning, groups, glyphSet=()): argument
10 # gather known kerning groups based on the prefixes
11 firstReferencedGroups, secondReferencedGroups = findKnownKerningGroups(groups)
12 # Make lists of groups referenced in kerning pairs.
14 if first in groups and first not in glyphSet:
18 if second in groups and second not in glyphSet:
21 # Create new names for these groups.
25 existingGroupNames = list(groups.keys()) + list(firstRenamedGroups.keys())
37 existingGroupNames = list(groups.keys()) + list(secondRenamedGroups.keys())
55 # Make copies of the referenced groups and store them
56 # under the new names in the overall groups dictionary.
60 group = list(groups[oldName])
61 groups[newName] = group
62 # Return the kerning and the groups.
63 return newKerning, groups, dict(side1=firstRenamedGroups, side2=secondRenamedGroups)
65 def findKnownKerningGroups(groups): argument
67 This will find kerning groups with known prefixes.
68 In some cases not all kerning groups will be referenced
69 by the kerning pairs. The algorithm for locating groups
71 unreferenced groups. By scanning for known prefixes
72 this function will catch all of the prefixed groups.
104 for groupName in list(groups.keys()):
156 >>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
189 >>> groups == expected
222 >>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
260 >>> groups == expected
267 Mixture of known prefixes and groups without prefixes.
295 >>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
329 >>> groups == expected