class_docstr: Support Graphite Glat tables
class_docstr_tok: ["Support","Graphite","Glat","tables"]
code: def compile(self, ttFont):
      data = sstruct.pack(Glat_format_0, self)
      if self.version <= 1.9:
          encoder = partial(
              self.compileAttributes12, fmt=Glat_format_1_entry
          )
      elif self.version <= 2.9:
          encoder = partial(
              self.compileAttributes12, fmt=Glat_format_1_entry
          )
      elif self.version >= 3.0:
          self.compression = (self.scheme << 27) + (
              1 if self.hasOctaboxes else 0
          )
          data = sstruct.pack(Glat_format_3, self)
          encoder = self.compileAttributes3
  
      glocs = []
      for n in range(len(self.attributes)):
          glocs.append(len(data))
          data += encoder(self.attributes[ttFont.getGlyphName(n)])
      glocs.append(len(data))
      ttFont["Gloc"].set(glocs)
  
      if self.version >= 3.0:
          data = grUtils.compress(self.scheme, data)
      return data
  
imports: from fontTools.misc import sstruct
  from fontTools.misc.fixedTools import floatToFixedToStr
  from fontTools.misc.textTools import safeEval
  from functools import partial
  from .None import DefaultTable
  from .None import grUtils
  import struct
label_desc: Use image node_id 5 for calling the table_G__l_a_t obj's underlying member method code with example usage: obj.compile(ttFont) and returns: data