Lines Matching refs:isCFF2
33 def decompile(self, file, otFont, isCFF2=None): argument
36 if isCFF2 is not None:
39 expected_major = (2 if isCFF2 else 1)
47 isCFF2 = self.major == 2
48 if not isCFF2:
51 self.fontNames = list(tostr(s) for s in Index(file, isCFF2=isCFF2))
52 self.topDictIndex = TopDictIndex(file, isCFF2=isCFF2)
61 file, cff2GetGlyphOrder, self.topDictSize, isCFF2=isCFF2)
63 self.GlobalSubrs = GlobalSubrsIndex(file, isCFF2=isCFF2)
92 def compile(self, file, otFont, isCFF2=None): argument
94 if isCFF2 is not None:
96 expected_major = (2 if isCFF2 else 1)
104 isCFF2 = self.major == 2
106 if otFont.recalcBBoxes and not isCFF2:
110 if not isCFF2:
114 writer = CFFWriter(isCFF2)
115 topCompiler = self.topDictIndex.getCompiler(strings, self, isCFF2=isCFF2)
116 if isCFF2:
127 if not isCFF2:
131 writer.add(fontNames.getCompiler(strings, self, isCFF2=isCFF2))
133 if not isCFF2:
135 writer.add(self.GlobalSubrs.getCompiler(strings, self, isCFF2=isCFF2))
298 self.compile(file, otFont, isCFF2=True)
300 self.decompile(file, otFont, isCFF2=True)
305 def __init__(self, isCFF2): argument
307 self.isCFF2 = isCFF2
323 if isinstance(item, TopDictIndexCompiler) and item.isCFF2:
336 if self.isCFF2:
365 def __init__(self, items, strings, parent, isCFF2=None): argument
366 if isCFF2 is None and hasattr(parent, "isCFF2"):
367 isCFF2 = parent.isCFF2
368 assert isCFF2 is not None
369 self.isCFF2 = isCFF2
392 if self.isCFF2:
414 if self.isCFF2:
457 if self.isCFF2:
464 if self.isCFF2:
471 if self.isCFF2:
493 if self.isCFF2:
520 cs.compile(self.isCFF2)
537 cs.compile(self.isCFF2)
551 def __init__(self, file=None, isCFF2=None): argument
552 assert (isCFF2 is None) == (file is None)
557 self._isCFF2 = isCFF2
560 if isCFF2:
607 def getCompiler(self, strings, parent, isCFF2=None): argument
608 return self.compilerClass(self, strings, parent, isCFF2=isCFF2)
621 fdSelect=None, fdArray=None, isCFF2=None): argument
622 super(GlobalSubrsIndex, self).__init__(file, isCFF2=isCFF2)
682 isCFF2=None): argument
683 assert (isCFF2 is None) == (file is None)
685 if file is not None and isCFF2:
686 self._isCFF2 = isCFF2
699 super(TopDictIndex, self).__init__(file, isCFF2=isCFF2)
704 self.cff2GetGlyphOrder, isCFF2=self._isCFF2)
731 self.strings, file, offset, self.GlobalSubrs, isCFF2=self._isCFF2,
851 isCFF2=None): argument
855 file, globalSubrs, private, fdSelect, fdArray, isCFF2=isCFF2)
1200 isCFF2 = parent._isCFF2
1206 parent.strings, file, offset, isCFF2=isCFF2, vstore=vstore)
1224 isCFF2 = parent._isCFF2
1226 return SubrsIndex(file, isCFF2=isCFF2)
1236 isCFF2 = parent._isCFF2
1251 file, charset, globalSubrs, private, fdSelect, fdArray, isCFF2=isCFF2)
1632 isCFF2 = parent._isCFF2
1634 fdArray = FDArrayIndex(file, isCFF2=isCFF2)
1932 def __init__(self, dictObj, strings, parent, isCFF2=None): argument
1935 if isCFF2 is None and hasattr(parent, "isCFF2"):
1936 isCFF2 = parent.isCFF2
1937 assert isCFF2 is not None
1938 self.isCFF2 = isCFF2
2102 isCFF2 = self.isCFF2
2142 items, strings, self, isCFF2=isCFF2)
2161 def __init__(self, dictObj, strings, parent, isCFF2=None): argument
2162 super(FontDictCompiler, self).__init__(dictObj, strings, parent, isCFF2=isCFF2)
2221 def __init__(self, strings=None, file=None, offset=None, isCFF2=None): argument
2222 assert (isCFF2 is None) == (file is None)
2228 self._isCFF2 = isCFF2
2244 def getCompiler(self, strings, parent, isCFF2=None): argument
2245 return self.compilerClass(self, strings, parent, isCFF2=isCFF2)
2303 GlobalSubrs=None, cff2GetGlyphOrder=None, isCFF2=None): argument
2304 super(TopDict, self).__init__(strings, file, offset, isCFF2=isCFF2)
2307 if isCFF2:
2402 GlobalSubrs=None, isCFF2=None, vstore=None): argument
2403 super(FontDict, self).__init__(strings, file, offset, isCFF2=isCFF2)
2405 self.setCFF2(isCFF2)
2407 def setCFF2(self, isCFF2): argument
2409 if isCFF2:
2424 def __init__(self, strings=None, file=None, offset=None, isCFF2=None, argument
2426 super(PrivateDict, self).__init__(strings, file, offset, isCFF2=isCFF2)
2428 if isCFF2:
2463 for s in Index(file, isCFF2=False)
2468 return IndexedStringsCompiler(self, None, self, isCFF2=False)