Sha256: 1b302fccc64b9cce1835fe87863c7483d428833473f048f1f67420dd84de8e5a

Contents?: true

Size: 701 Bytes

Versions: 35

Compression:

Stored size: 701 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'test_helper'
require 'hexapdf/document'
require 'hexapdf/type/font_type3'

describe HexaPDF::Type::FontType3 do
  before do
    @doc = HexaPDF::Document.new
    @font = @doc.add({Type: :Font, Subtype: :Type3, Encoding: :WinAnsiEncoding,
                      FirstChar: 32, LastChar: 34, Widths: [600, 0, 700],
                      FontBBox: [0, 0, 100, 100], FontMatrix: [1, 0, 0, 1, 0, 0],
                      CharProcs: {}})
  end

  describe "validation" do
    it "works for valid objects" do
      assert(@font.validate)
    end

    it "fails if the Encoding key is missing" do
      @font.delete(:Encoding)
      refute(@font.validate)
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
hexapdf-0.19.0 test/hexapdf/type/test_font_type3.rb
hexapdf-0.18.0 test/hexapdf/type/test_font_type3.rb
hexapdf-0.17.3 test/hexapdf/type/test_font_type3.rb
hexapdf-0.17.2 test/hexapdf/type/test_font_type3.rb
hexapdf-0.16.0 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.9 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.8 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.7 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.6 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.5 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.4 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.3 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.2 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.1 test/hexapdf/type/test_font_type3.rb
hexapdf-0.15.0 test/hexapdf/type/test_font_type3.rb
hexapdf-0.14.4 test/hexapdf/type/test_font_type3.rb
hexapdf-0.14.3 test/hexapdf/type/test_font_type3.rb
hexapdf-0.14.2 test/hexapdf/type/test_font_type3.rb
hexapdf-0.14.1 test/hexapdf/type/test_font_type3.rb
hexapdf-0.14.0 test/hexapdf/type/test_font_type3.rb