Home | History | Annotate | Download | only in fontTools

Lines Matching refs:lst

35 def equal(lst):
36 lst = list(lst)
37 t = iter(lst)
39 assert all(item == first for item in t), "Expected all items to be equal: %s" % lst
42 def first(lst):
43 return next(iter(lst))
45 def recalculate(lst):
48 def current_time(lst):
51 def bitwise_and(lst):
52 return reduce(operator.and_, lst)
54 def bitwise_or(lst):
55 return reduce(operator.or_, lst)
57 def avg_int(lst):
58 lst = list(lst)
59 return sum(lst) // len(lst)
67 def wrapper(lst):
68 items = [item for item in lst if item is not NotImplemented]
73 def sumLists(lst):
75 for item in lst:
79 def sumDicts(lst):
81 for item in lst:
85 def mergeObjects(lst):
86 lst = [item for item in lst if item is not NotImplemented]
87 if not lst:
89 lst = [item for item in lst if item is not None]
90 if not lst:
93 clazz = lst[0].__class__
94 assert all(type(item) == clazz for item in lst), lst
100 allKeys = set.union(set(), *(vars(table).keys() for table in lst))
112 value = mergeLogic(getattr(table, key, NotImplemented) for table in lst)
122 def wrapper(lst):
123 lst = list(lst)
134 mergedValue = mergeLogic(bool(item & shiftedBit) for item in lst)
185 'checkSumAdjustment': lambda lst: 0, # We need *something* here
197 'fontDirectionHint': lambda lst: 2,
229 def mergeOs2FsType(lst):
230 lst = list(lst)
231 if all(item == 0 for item in lst):
235 for i in range(len(lst)):
237 if lst[i] & 0x000C:
238 lst[i] &= ~0x0002
240 elif lst[i] & 0x0008:
241 lst[i] |= 0x0004
243 elif lst[i] == 0:
244 lst[i] = 0x000C
246 fsType = mergeBits(os2FsTypeMergeBitMap)(lst)
298 'maxMemType42': lambda lst: 0,
300 'maxMemType1': lambda lst: 0,
302 'extraNames': lambda lst: [],
346 ttLib.getTableClass('prep').mergeMap = lambda self, lst: first(lst)
347 ttLib.getTableClass('fpgm').mergeMap = lambda self, lst: first(lst)
348 ttLib.getTableClass('cvt ').mergeMap = lambda self, lst: first(lst)
385 'ScriptRecord': lambda lst: sorted(sumLists(lst), key=lambda s: s.ScriptTag),