File: top_index.rb

package info (click to toggle)
ruby-ttfunk 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,472 kB
  • sloc: ruby: 7,954; makefile: 7
file content (21 lines) | stat: -rw-r--r-- 446 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module TTFunk
  class Table
    class Cff < TTFunk::Table
      # CFF Index conatining Top dict.
      class TopIndex < TTFunk::Table::Cff::Index
        private

        def decode_item(_index, offset, length)
          TTFunk::Table::Cff::TopDict.new(file, offset, length)
        end

        def encode_items(*)
          # Re-encode the top dict
          map(&:encode)
        end
      end
    end
  end
end