def _build(self, data):
    tag, version, font_count = struct.unpack(_ttcHeader, data[:_ttcHeaderSize])
    if tag not in ['ttcf']:
      raise ValueError('not a font collection')
    if version not in [0x10000, 0x20000]:
      raise ValueError('unrecognized version %s' % version)

    self.fonts = []
    self.tables = []
    for i in range(font_count):
      pos = _ttcHeaderSize + i * 4
      offset = struct.unpack('>L', data[pos:pos + 4])[0]
      self._build_font_entry(data, offset)
dataset/ETHPy150Open googlei18n/nototools/nototools/ttc_utils.py/TTCFile._build/original