• Home
  • Raw
  • Download

Lines Matching full:groups

8 def convertUFO1OrUFO2KerningToUFO3Kerning(kerning, groups, glyphSet=()):  argument
9 # gather known kerning groups based on the prefixes
10 firstReferencedGroups, secondReferencedGroups = findKnownKerningGroups(groups)
11 # Make lists of groups referenced in kerning pairs.
13 if first in groups and first not in glyphSet:
17 if second in groups and second not in glyphSet:
20 # Create new names for these groups.
24 existingGroupNames = list(groups.keys()) + list(firstRenamedGroups.keys())
36 existingGroupNames = list(groups.keys()) + list(secondRenamedGroups.keys())
54 # Make copies of the referenced groups and store them
55 # under the new names in the overall groups dictionary.
59 group = list(groups[oldName])
60 groups[newName] = group
61 # Return the kerning and the groups.
62 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.
100 for groupName in list(groups.keys()):
153 >>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
186 >>> groups == expected
219 >>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
257 >>> groups == expected
264 Mixture of known prefixes and groups without prefixes.
292 >>> kerning, groups, maps = convertUFO1OrUFO2KerningToUFO3Kerning(
326 >>> groups == expected