Sha256: 55a562fdc4ddb49479f2376630a9108a17b1e7466500f501555cac0a4964278b

Contents?: true

Size: 1.03 KB

Versions: 34

Compression:

Stored size: 1.03 KB

Contents

require 'ttfunk/reader'

module TTFunk
  class Table
    class Glyf
      class Simple
        attr_reader :raw
        attr_reader :number_of_contours
        attr_reader :x_min, :y_min, :x_max, :y_max

        def initialize(raw, number_of_contours, x_min, y_min, x_max, y_max)
          @raw = raw
          @number_of_contours = number_of_contours
          @x_min, @y_min = x_min, y_min
          @x_max, @y_max = x_max, y_max

          # Because TTFunk is, at this time, a library for simply pulling
          # metrics out of font files, or for writing font subsets, we don't
          # really care what the contours are for simple glyphs. We just
          # care that we've got an entire glyph's definition. Also, a
          # bounding box could be nice to know. Since we've got all that
          # at this point, we don't need to worry about parsing the full
          # contents of the glyph.
        end

        def compound?
          false
        end

        def recode(mapping)
          raw
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 10 rubygems

Version Path
prawn-core-0.8.4 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-graph-0.0.2 vendor/prawn-core/vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-graph-0.0.1 vendor/prawn-core/vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-core-0.7.2 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-core-0.7.1 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-layout-0.3.2 vendor/prawn-core/vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-core-0.6.3 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-core-0.6.2 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-layout-0.3.1 vendor/prawn-core/vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-core-0.6.1 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-core-0.5.1 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-core-0.5.0.1 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-0.4.1 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
prawn-0.4.0 vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb