File: format40.rb

package info (click to toggle)
ruby-ttfunk 1.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 916 kB
  • sloc: ruby: 1,719; makefile: 16
file content (17 lines) | stat: -rw-r--r-- 291 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module TTFunk
  class Table
    class Post
      module Format40
        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