code: def compile(self):
          
          self.otf = TTFont(sfntVersion=self.sfntVersion)
  
          # only compile vertical metrics tables if vhea metrics a defined
          vertical_metrics = [
              "openTypeVheaVertTypoAscender",
              "openTypeVheaVertTypoDescender",
              "openTypeVheaVertTypoLineGap",
              "openTypeVheaCaretSlopeRise",
              "openTypeVheaCaretSlopeRun",
              "openTypeVheaCaretOffset",
          ]
          self.vertical = all(
              getAttrWithFallback(self.ufo.info, metric) is not None
              for metric in vertical_metrics
          )
  
          # write the glyph order
          self.otf.setGlyphOrder(self.glyphOrder)
  
          # populate basic tables
          self.setupTable_head()
          self.setupTable_hmtx()
          self.setupTable_hhea()
          self.setupTable_name()
          self.setupTable_maxp()
          self.setupTable_cmap()
          self.setupTable_OS2()
          self.setupTable_post()
          if self.vertical:
              self.setupTable_vmtx()
              self.setupTable_vhea()
          self.setupOtherTables()
          self.importTTX()
  
          return self.otf
docs: Compile the OpenType binary.