# File lib/ttfunk/table/post.rb, line 31
      def recode(mapping)
        return raw if format == 0x00030000

        table = raw[0,32]
        table[0,4] = [0x00020000].pack("N")

        index = []
        strings = []

        mapping.keys.sort.each do |new_id|
          post_glyph = glyph_for(mapping[new_id])
          position = Format10::POSTSCRIPT_GLYPHS.index(post_glyph)
          if position
            index << position
          else
            index << 257 + strings.length
            strings << post_glyph
          end
        end

        table << [mapping.length, *index].pack("n*")
        strings.each do |string|
          table << [string.length, string].pack("CA*")
        end

        return table
      end