Sha256: 711cf0064b15395764f64b54c7109d9dc585662aebc45c1cc436d98646832339

Contents?: true

Size: 468 Bytes

Versions: 34

Compression:

Stored size: 468 Bytes

Contents

module TTFunk
  class Directory
    attr_reader :tables
    attr_reader :scaler_type

    def initialize(io)
      @scaler_type, table_count, search_range,
        entry_selector, range_shift = io.read(12).unpack("Nn*")
      
      @tables = {}
      table_count.times do
        tag, checksum, offset, length = io.read(16).unpack("a4N*")
        @tables[tag] = { :tag => tag, :checksum => checksum, :offset => offset, :length => length }
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 10 rubygems

Version Path
ttfunk-1.2.2 lib/ttfunk/directory.rb
ttfunk-1.2.1 lib/ttfunk/directory.rb
ttfunk-1.2.0 lib/ttfunk/directory.rb
ttfunk-1.1.1 lib/ttfunk/directory.rb
ttfunk-1.1.0 lib/ttfunk/directory.rb
ttfunk-1.0.3 lib/ttfunk/directory.rb
ttfunk-1.0.2 lib/ttfunk/directory.rb
ttfunk-1.0.1 lib/ttfunk/directory.rb
davebenvenuti-prawn-0.11.1.pre vendor/ttfunk/lib/ttfunk/directory.rb
piglop-prawn-0.10.2.3 vendor/ttfunk/lib/ttfunk/directory.rb
piglop-prawn-0.10.2.2 vendor/ttfunk/lib/ttfunk/directory.rb
piglop-prawn-0.10.2.1 vendor/ttfunk/lib/ttfunk/directory.rb
glyph_imager-0.1.1 vendor/ttfunk/lib/ttfunk/directory.rb
prawn-0.11.1.pre vendor/ttfunk/lib/ttfunk/directory.rb
goodwill-prawn-edge-0.10.0 vendor/ttfunk/lib/ttfunk/directory.rb
alphasights-prawn-0.10.4 vendor/ttfunk/lib/ttfunk/directory.rb
alphasights-prawn-0.10.3 vendor/ttfunk/lib/ttfunk/directory.rb
alphasights-prawn-0.10.2 vendor/ttfunk/lib/ttfunk/directory.rb
alphasights-prawn-0.10.1 vendor/ttfunk/lib/ttfunk/directory.rb
glyph_imager-0.1.0 vendor/ttfunk/lib/ttfunk/directory.rb