def METHOD_NAME(self, ttFont):
    fdat = b""
    vdat = b""
    offset = 0
    for f, v in sorted(self.features.items(), key=lambda x: x[1].index):
        fnum = grUtils.tag2num(f)
        if self.version >= 2.0:
            fdat += struct.pack(
                ">LHHLHH",
                grUtils.tag2num(f),
                len(v.settings),
                0,
                offset * 4 + 12 + 16 * len(self.features),
                v.flags,
                v.label,
            )
        elif fnum > 65535:  # self healing for alphabetic ids
            self.version = 2.0
            return self.METHOD_NAME(ttFont)
        else:
            fdat += struct.pack(
                ">HHLHH",
                grUtils.tag2num(f),
                len(v.settings),
                offset * 4 + 12 + 12 * len(self.features),
                v.flags,
                v.label,
            )
        for s, l in sorted(
            v.settings.items(), key=lambda x: (-1, x[1]) if x[0] == v.default else x
        ):
            vdat += struct.pack(">HH", s, l)
        offset += len(v.settings)
    hdr = sstruct.pack(Feat_hdr_format, self)
    return hdr + struct.pack(">HHL", len(self.features), 0, 0) + fdat + vdat