Sha256: 81033f7a5387b9bdd12742ac90ffac5cf3356e5f1408ad3e09181bc8cdcba3dd

Contents?: true

Size: 488 Bytes

Versions: 1

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

module TTFunk
  class Table
    class Post
      # Version 4.0 names glyphs by their character code.
      module Format40
        # Get glyph name for character code.
        #
        # @param code [Integer]
        # @return [String]
        def glyph_for(code)
          @map[code] || 0xFFFF
        end

        private

        def parse_format!
          @map = read(file.maximum_profile.num_glyphs * 2, 'N*')
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ttfunk-1.8.0 lib/ttfunk/table/post/format40.rb