• Home
  • Raw
  • Download

Lines Matching refs:glyphs

46 def intersect(self, glyphs):  argument
48 return [i for i,g in enumerate(self.glyphs) if g in glyphs]
51 def intersect_glyphs(self, glyphs): argument
53 return set(g for g in self.glyphs if g in glyphs)
56 def subset(self, glyphs): argument
58 indices = self.intersect(glyphs)
59 self.glyphs = [g for g in self.glyphs if g in glyphs]
65 self.glyphs = [self.glyphs[i] for i in coverage_map]
68 def intersect(self, glyphs): argument
71 ([0] if any(g not in self.classDefs for g in glyphs) else []) +
72 [v for g,v in self.classDefs.items() if g in glyphs])
75 def intersect_class(self, glyphs, klass): argument
78 return set(g for g in glyphs if g not in self.classDefs)
80 if v == klass and g in glyphs)
83 def subset(self, glyphs, remap=False): argument
85 self.classDefs = dict((g,v) for g,v in self.classDefs.items() if g in glyphs)
89 ([0] if any(g not in self.classDefs for g in glyphs) else []) +
103 if cur_glyphs is None: cur_glyphs = s.glyphs
104 s.glyphs.update(v for g,v in self.mapping.items() if g in cur_glyphs)
109 if g in s.glyphs and v in s.glyphs)
114 if cur_glyphs is None: cur_glyphs = s.glyphs
116 _set_update(s.glyphs, *(self.Sequence[i].Substitute for i in indices))
120 indices = self.Coverage.subset(s.glyphs)
124 if all(sub in s.glyphs for sub in seq.Substitute)]
132 if cur_glyphs is None: cur_glyphs = s.glyphs
133 _set_update(s.glyphs, *(vlist for g,vlist in self.alternates.items()
140 if g in s.glyphs and
141 all(v in s.glyphs for v in vlist))
146 if cur_glyphs is None: cur_glyphs = s.glyphs
147 _set_update(s.glyphs, *([seq.LigGlyph for seq in seqs
148 if all(c in s.glyphs for c in seq.Component)]
155 if g in s.glyphs)
157 if seq.LigGlyph in s.glyphs and
158 all(c in s.glyphs for c in seq.Component)])
165 if cur_glyphs is None: cur_glyphs = s.glyphs
169 not all(c.intersect(s.glyphs)
172 s.glyphs.update(self.Substitute[i] for i in indices)
179 indices = self.Coverage.subset(s.glyphs)
183 if sub in s.glyphs]
188 all(c.subset(s.glyphs)
196 return len(self.Coverage.subset(s.glyphs))
198 indices = self.Coverage.subset(s.glyphs)
215 indices = self.Coverage.subset(s.glyphs)
219 if r.SecondGlyph in s.glyphs]
228 class1_map = self.ClassDef1.subset(s.glyphs, remap=True)
229 class2_map = self.ClassDef2.subset(s.glyphs, remap=True)
237 self.Coverage.subset(s.glyphs))
252 indices = self.Coverage.subset(s.glyphs)
276 mark_indices = self.MarkCoverage.subset(s.glyphs)
280 base_indices = self.BaseCoverage.subset(s.glyphs)
312 mark_indices = self.MarkCoverage.subset(s.glyphs)
316 ligature_indices = self.LigatureCoverage.subset(s.glyphs)
350 mark1_indices = self.Mark1Coverage.subset(s.glyphs)
354 mark2_indices = self.Mark2Coverage.subset(s.glyphs)
532 self.Intersect = lambda glyphs, c, r: [r] if r in glyphs else []
538 self.Intersect = lambda glyphs, c, r: c.intersect_class(glyphs, r)
556 if cur_glyphs is None: cur_glyphs = s.glyphs
559 indices = c.Coverage(self).intersect(s.glyphs)
562 cur_glyphs = c.Coverage(self).intersect_glyphs(s.glyphs);
572 if all(all(c.Intersect(s.glyphs, cd, k) for k in klist)
579 pos_glyphs = s.glyphs
582 pos_glyphs = set([c.Coverage(self).glyphs[i]])
598 if all(all(c.Intersect(s.glyphs, cd, k) for k in klist)
605 pos_glyphs = s.glyphs
610 pos_glyphs = ClassDef.intersect_class(s.glyphs,
616 if not all(x.intersect(s.glyphs) for x in c.RuleData(self)):
624 pos_glyphs = s.glyphs
629 pos_glyphs = r.InputCoverage[seqi].intersect_glyphs(s.glyphs)
644 indices = self.Coverage.subset(s.glyphs)
651 if r and all(all(g in s.glyphs for g in glist)
661 if not self.Coverage.subset(s.glyphs):
664 klass_maps = [x.subset(s.glyphs, remap=True) for x in ContextData]
673 indices = getattr(self, c.ClassDef).intersect(self.Coverage.glyphs)
693 return all(x.subset(s.glyphs) for x in c.RuleData(self))
988 orig_glyphs = s.glyphs.copy()
993 if orig_glyphs == s.glyphs:
1000 s.glyphs = s.glyphs_gsubed
1149 glyphs = s.glyphs_gsubed
1152 indices = table.LigCaretList.Coverage.subset(glyphs)
1160 if g in glyphs)
1165 if g in glyphs)
1167 indices = table.AttachList.Coverage.subset(glyphs)
1175 coverage.subset(glyphs)
1211 glyphs = s.glyphs_gsubed
1214 if a in glyphs and b in glyphs)
1220 self.metrics = dict((g,v) for g,v in self.metrics.items() if g in s.glyphs)
1225 self.metrics = dict((g,v) for g,v in self.metrics.items() if g in s.glyphs)
1230 self.hdmx = dict((sz,dict((g,v) for g,v in l.items() if g in s.glyphs))
1237 if g in s.glyphs)
1280 decompose = s.glyphs
1284 if g not in self.glyphs:
1286 gl = self.glyphs[g]
1288 if c not in s.glyphs:
1290 components = set(c for c in components if c not in s.glyphs)
1294 s.glyphs.update(components)
1307 self.glyphs = dict((g,v) for g,v in self.glyphs.items() if g in s.glyphs)
1308 indices = [i for i,g in enumerate(self.glyphOrder) if g in s.glyphs]
1309 for v in self.glyphs.values():
1314 self.glyphOrder = [g for g in self.glyphOrder if g in s.glyphs]
1321 for v in self.glyphs.values():
1350 if g not in s.glyphs: continue
1354 indices = [i for i,g in enumerate(font.charset) if g in s.glyphs]
1365 if g in s.glyphs)
1369 if g in s.glyphs)
1370 font.charset = [g for g in font.charset if g in s.glyphs]
1710 s.glyphs.update(gids)
1714 s.glyphs.add(table.cmap[u])
1734 s.glyphs = s.glyphs_cmaped
1746 if g in s.glyphs or u in s.unicodes_requested])
1926 self.glyphs = set()
1928 def populate(self, glyphs=[], unicodes=[], text=""): argument
1934 self.glyphs_requested.update(glyphs)
1935 self.glyphs.update(glyphs)
1966 self.glyphs = self.glyphs_requested.copy()
1970 self.glyphs.intersection_update(realGlyphs)
1971 self.glyphs_cmaped = self.glyphs
1975 self.glyphs.add(font.getGlyphName(0))
1978 self.glyphs.add('.notdef')
1983 self.glyphs.add(font.getGlyphName(i))
1988 len(self.glyphs))
1989 self.log.glyphs(self.glyphs, font=font)
1991 self.glyphs.intersection_update(realGlyphs)
1993 len(self.glyphs))
1994 self.log.glyphs(self.glyphs, font=font)
1996 self.glyphs_gsubed = self.glyphs.copy()
2000 len(self.glyphs))
2001 self.log.glyphs(self.glyphs, font=font)
2003 self.glyphs.intersection_update(realGlyphs)
2005 len(self.glyphs))
2006 self.log.glyphs(self.glyphs, font=font)
2008 self.glyphs_glyfed = self.glyphs.copy()
2010 self.glyphs_all = self.glyphs.copy()
2014 del self.glyphs
2026 self.glyphs = self.glyphs_all
2028 del self.glyphs
2096 def glyphs(self, glyphs, font=None): member in Logger
2099 self("Names: ", sorted(glyphs))
2102 self("Gids : ", sorted(reverseGlyphMap[g] for g in glyphs))
2184 glyphs = []
2189 glyphs.extend(font.getGlyphOrder())
2192 glyphs.append(g)
2211 glyphs.append(font.getGlyphName(int(g), requireReal=True))
2218 log("Glyphs:", glyphs)
2220 subsetter.populate(glyphs=glyphs, unicodes=unicodes, text=text)