Sha256: c198a7ff35afc3be1b01775c4133a59495720fbde32dafa9e18dca72a7e3af17
Contents?: true
Size: 865 Bytes
Versions: 4
Compression:
Stored size: 865 Bytes
Contents
#!/usr/bin/env ruby # # Created by Brent Rowland on 2007-11-03. # Copyright (c) 2007, Eidetic Software. All rights reserved. $: << File.dirname(__FILE__) + '/../lib' require 'test/unit' require 'epdftt' include EideticPDF class PdfTTTestCases < Test::Unit::TestCase def test_font_index assert_equal(0, PdfTT::font_index('Arial')) assert_equal(11, PdfTT::font_index('CourierNew,BoldItalic')) end def test_font_metrics assert_not_nil(PdfTT::font_metrics('Arial')) assert_raise(Exception) { PdfTT::font_metrics('BogusFontName') } end end class PdfTT_FontMetricsTestCases < Test::Unit::TestCase def setup @metrics0 = PdfTT::font_metrics('Arial') @metrics11 = PdfTT::font_metrics('CourierNew,BoldItalic') end def test_widths assert_equal(191, @metrics0.widths[39]) assert_equal(600, @metrics11.widths[39]) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
eideticpdf-1.0.2 | test/test_epdftt.rb |
eideticpdf-1.0.1 | test/test_epdftt.rb |
eideticpdf-1.0.0 | test/test_epdftt.rb |
eideticpdf-0.9.9 | test/test_epdftt.rb |