prawn 0.11.1.pre → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. data/COPYING +2 -340
  2. data/HACKING +1 -1
  3. data/LICENSE +3 -3
  4. data/Rakefile +17 -6
  5. data/data/encodings/win_ansi.txt +1 -1
  6. data/data/images/prawn.png +0 -0
  7. data/data/pdfs/form.pdf +820 -0
  8. data/data/pdfs/multipage_template.pdf +127 -0
  9. data/examples/bounding_box/bounding_boxes.rb +4 -3
  10. data/examples/bounding_box/indentation.rb +2 -1
  11. data/examples/bounding_box/russian_boxes.rb +3 -2
  12. data/examples/bounding_box/stretched_nesting.rb +2 -1
  13. data/examples/general/background.rb +2 -1
  14. data/examples/general/canvas.rb +2 -1
  15. data/examples/general/context_sensitive_headers.rb +2 -1
  16. data/examples/general/float.rb +2 -1
  17. data/examples/general/margin.rb +2 -1
  18. data/examples/general/measurement_units.rb +2 -1
  19. data/examples/general/metadata-info.rb +2 -1
  20. data/examples/general/multi_page_layout.rb +2 -1
  21. data/examples/general/outlines.rb +2 -1
  22. data/examples/general/page_geometry.rb +2 -1
  23. data/examples/general/page_numbering.rb +27 -2
  24. data/examples/general/page_templates.rb +20 -0
  25. data/examples/general/repeaters.rb +2 -1
  26. data/examples/general/stamp.rb +4 -3
  27. data/examples/general/templates.rb +2 -1
  28. data/examples/graphics/basic_images.rb +2 -1
  29. data/examples/graphics/cmyk.rb +2 -1
  30. data/examples/graphics/curves.rb +4 -3
  31. data/examples/graphics/gradient.rb +23 -0
  32. data/examples/graphics/hexagon.rb +3 -2
  33. data/examples/graphics/image_fit.rb +3 -2
  34. data/examples/graphics/image_flow.rb +2 -1
  35. data/examples/graphics/image_position.rb +3 -2
  36. data/examples/graphics/line.rb +2 -1
  37. data/examples/graphics/png_types.rb +3 -2
  38. data/examples/graphics/polygons.rb +3 -2
  39. data/examples/graphics/remote_images.rb +2 -1
  40. data/examples/graphics/rounded_polygons.rb +2 -1
  41. data/examples/graphics/rounded_rectangle.rb +2 -1
  42. data/examples/graphics/ruport_style_helpers.rb +3 -2
  43. data/examples/graphics/stroke_bounds.rb +2 -1
  44. data/examples/graphics/stroke_cap_and_join.rb +2 -1
  45. data/examples/graphics/stroke_dash.rb +2 -1
  46. data/examples/graphics/transformations.rb +2 -1
  47. data/examples/graphics/transparency.rb +4 -3
  48. data/examples/grid/bounding_boxes.rb +2 -1
  49. data/examples/grid/column_gutter_grid.rb +2 -1
  50. data/examples/grid/multi_boxes.rb +2 -1
  51. data/examples/grid/show_grid.rb +2 -1
  52. data/examples/grid/simple_grid.rb +2 -1
  53. data/examples/m17n/chinese_text_wrapping.rb +2 -1
  54. data/examples/m17n/euro.rb +3 -2
  55. data/examples/m17n/full_win_ansi_character_list.rb +20 -0
  56. data/examples/m17n/sjis.rb +2 -1
  57. data/examples/m17n/utf8.rb +3 -2
  58. data/examples/m17n/win_ansi_charset.rb +2 -1
  59. data/examples/security/hello_foo.rb +2 -1
  60. data/examples/table/bill.rb +2 -1
  61. data/examples/table/borders.rb +25 -0
  62. data/examples/table/cell.rb +3 -2
  63. data/examples/table/checkerboard.rb +2 -1
  64. data/examples/table/header.rb +3 -2
  65. data/examples/table/inline_format_table.rb +2 -1
  66. data/examples/table/multi_page_table.rb +2 -1
  67. data/examples/table/simple_table.rb +2 -1
  68. data/examples/table/subtable.rb +2 -1
  69. data/examples/table/widths.rb +2 -1
  70. data/examples/text/alignment.rb +2 -1
  71. data/examples/text/character_spacing.rb +2 -1
  72. data/examples/text/dfont.rb +2 -1
  73. data/examples/text/family_based_styling.rb +3 -2
  74. data/examples/text/font_calculations.rb +2 -1
  75. data/examples/text/font_size.rb +2 -1
  76. data/examples/text/hyphenation.rb +2 -2
  77. data/examples/text/indent_paragraphs.rb +7 -5
  78. data/examples/text/inline_format.rb +7 -6
  79. data/examples/text/kerning.rb +2 -1
  80. data/examples/text/rendering_mode.rb +21 -0
  81. data/examples/text/rotated.rb +2 -1
  82. data/examples/text/shaped_text_box.rb +2 -1
  83. data/examples/text/simple_text.rb +2 -1
  84. data/examples/text/simple_text_ttf.rb +2 -1
  85. data/examples/text/span.rb +3 -2
  86. data/examples/text/text_box.rb +7 -5
  87. data/examples/text/text_box_returning_excess.rb +4 -3
  88. data/examples/text/text_flow.rb +2 -1
  89. data/lib/prawn.rb +1 -1
  90. data/lib/prawn/core/object_store.rb +42 -14
  91. data/lib/prawn/core/page.rb +22 -8
  92. data/lib/prawn/core/text.rb +141 -13
  93. data/lib/prawn/core/text/formatted/arranger.rb +39 -12
  94. data/lib/prawn/core/text/formatted/line_wrap.rb +205 -60
  95. data/lib/prawn/core/text/formatted/wrap.rb +72 -35
  96. data/lib/prawn/document.rb +174 -70
  97. data/lib/prawn/document/bounding_box.rb +122 -83
  98. data/lib/prawn/document/column_box.rb +113 -0
  99. data/lib/prawn/document/graphics_state.rb +90 -2
  100. data/lib/prawn/document/internals.rb +5 -3
  101. data/lib/prawn/errors.rb +5 -0
  102. data/lib/prawn/font.rb +4 -4
  103. data/lib/prawn/font/afm.rb +11 -0
  104. data/lib/prawn/font/ttf.rb +5 -0
  105. data/lib/prawn/graphics.rb +77 -14
  106. data/lib/prawn/graphics/cap_style.rb +13 -5
  107. data/lib/prawn/graphics/color.rb +54 -35
  108. data/lib/prawn/graphics/dash.rb +27 -16
  109. data/lib/prawn/graphics/gradient.rb +84 -0
  110. data/lib/prawn/graphics/join_style.rb +12 -3
  111. data/lib/prawn/graphics/transparency.rb +4 -4
  112. data/lib/prawn/images.rb +18 -160
  113. data/lib/prawn/images/jpg.rb +39 -0
  114. data/lib/prawn/images/png.rb +130 -0
  115. data/lib/prawn/repeater.rb +6 -13
  116. data/lib/prawn/security.rb +6 -1
  117. data/lib/prawn/stamp.rb +12 -4
  118. data/lib/prawn/table.rb +36 -4
  119. data/lib/prawn/table/cell.rb +224 -63
  120. data/lib/prawn/table/cell/text.rb +20 -10
  121. data/lib/prawn/table/cells.rb +23 -6
  122. data/lib/prawn/text.rb +54 -91
  123. data/lib/prawn/text/box.rb +29 -283
  124. data/lib/prawn/text/formatted/box.rb +349 -24
  125. data/lib/prawn/text/formatted/fragment.rb +63 -2
  126. data/lib/prawn/text/formatted/parser.rb +2 -1
  127. data/prawn.gemspec +21 -5
  128. data/spec/bounding_box_spec.rb +61 -28
  129. data/spec/cell_spec.rb +168 -30
  130. data/spec/document_spec.rb +187 -3
  131. data/spec/extensions/mocha.rb +45 -0
  132. data/spec/font_spec.rb +32 -1
  133. data/spec/formatted_text_arranger_spec.rb +35 -40
  134. data/spec/formatted_text_box_spec.rb +287 -443
  135. data/spec/formatted_text_fragment_spec.rb +87 -0
  136. data/spec/graphics_spec.rb +128 -12
  137. data/spec/grid_spec.rb +1 -1
  138. data/spec/images_spec.rb +11 -3
  139. data/spec/inline_formatted_text_parser_spec.rb +8 -0
  140. data/spec/line_wrap_spec.rb +200 -208
  141. data/spec/object_store_spec.rb +10 -0
  142. data/spec/outline_spec.rb +7 -3
  143. data/spec/repeater_spec.rb +58 -10
  144. data/spec/security_spec.rb +6 -0
  145. data/spec/spec_helper.rb +12 -8
  146. data/spec/stamp_spec.rb +52 -1
  147. data/spec/stroke_styles_spec.rb +30 -0
  148. data/spec/table_spec.rb +93 -3
  149. data/spec/template_spec.rb +132 -6
  150. data/spec/text_at_spec.rb +14 -4
  151. data/spec/text_box_spec.rb +309 -70
  152. data/spec/text_rendering_mode_spec.rb +45 -0
  153. data/spec/text_spec.rb +60 -17
  154. data/spec/text_with_inline_formatting_spec.rb +4 -162
  155. metadata +241 -241
  156. data/lib/prawn/core/text/line_wrap.rb +0 -211
  157. data/lib/prawn/core/text/wrap.rb +0 -82
  158. data/vendor/pdf-inspector/README +0 -18
  159. data/vendor/pdf-inspector/lib/pdf/inspector.rb +0 -26
  160. data/vendor/pdf-inspector/lib/pdf/inspector/extgstate.rb +0 -18
  161. data/vendor/pdf-inspector/lib/pdf/inspector/graphics.rb +0 -131
  162. data/vendor/pdf-inspector/lib/pdf/inspector/page.rb +0 -25
  163. data/vendor/pdf-inspector/lib/pdf/inspector/text.rb +0 -46
  164. data/vendor/pdf-inspector/lib/pdf/inspector/xobject.rb +0 -19
  165. data/vendor/ttfunk/data/fonts/DejaVuSans.ttf +0 -0
  166. data/vendor/ttfunk/data/fonts/comicsans.ttf +0 -0
  167. data/vendor/ttfunk/example.rb +0 -45
  168. data/vendor/ttfunk/lib/ttfunk.rb +0 -102
  169. data/vendor/ttfunk/lib/ttfunk/directory.rb +0 -17
  170. data/vendor/ttfunk/lib/ttfunk/encoding/mac_roman.rb +0 -88
  171. data/vendor/ttfunk/lib/ttfunk/encoding/windows_1252.rb +0 -69
  172. data/vendor/ttfunk/lib/ttfunk/reader.rb +0 -44
  173. data/vendor/ttfunk/lib/ttfunk/resource_file.rb +0 -78
  174. data/vendor/ttfunk/lib/ttfunk/subset.rb +0 -18
  175. data/vendor/ttfunk/lib/ttfunk/subset/base.rb +0 -141
  176. data/vendor/ttfunk/lib/ttfunk/subset/mac_roman.rb +0 -50
  177. data/vendor/ttfunk/lib/ttfunk/subset/unicode.rb +0 -48
  178. data/vendor/ttfunk/lib/ttfunk/subset/unicode_8bit.rb +0 -63
  179. data/vendor/ttfunk/lib/ttfunk/subset/windows_1252.rb +0 -55
  180. data/vendor/ttfunk/lib/ttfunk/subset_collection.rb +0 -72
  181. data/vendor/ttfunk/lib/ttfunk/table.rb +0 -46
  182. data/vendor/ttfunk/lib/ttfunk/table/cmap.rb +0 -34
  183. data/vendor/ttfunk/lib/ttfunk/table/cmap/format00.rb +0 -54
  184. data/vendor/ttfunk/lib/ttfunk/table/cmap/format04.rb +0 -126
  185. data/vendor/ttfunk/lib/ttfunk/table/cmap/subtable.rb +0 -79
  186. data/vendor/ttfunk/lib/ttfunk/table/glyf.rb +0 -64
  187. data/vendor/ttfunk/lib/ttfunk/table/glyf/compound.rb +0 -81
  188. data/vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb +0 -37
  189. data/vendor/ttfunk/lib/ttfunk/table/head.rb +0 -44
  190. data/vendor/ttfunk/lib/ttfunk/table/hhea.rb +0 -41
  191. data/vendor/ttfunk/lib/ttfunk/table/hmtx.rb +0 -47
  192. data/vendor/ttfunk/lib/ttfunk/table/kern.rb +0 -79
  193. data/vendor/ttfunk/lib/ttfunk/table/kern/format0.rb +0 -62
  194. data/vendor/ttfunk/lib/ttfunk/table/loca.rb +0 -43
  195. data/vendor/ttfunk/lib/ttfunk/table/maxp.rb +0 -40
  196. data/vendor/ttfunk/lib/ttfunk/table/name.rb +0 -125
  197. data/vendor/ttfunk/lib/ttfunk/table/os2.rb +0 -78
  198. data/vendor/ttfunk/lib/ttfunk/table/post.rb +0 -91
  199. data/vendor/ttfunk/lib/ttfunk/table/post/format10.rb +0 -43
  200. data/vendor/ttfunk/lib/ttfunk/table/post/format20.rb +0 -35
  201. data/vendor/ttfunk/lib/ttfunk/table/post/format25.rb +0 -23
  202. data/vendor/ttfunk/lib/ttfunk/table/post/format30.rb +0 -17
  203. data/vendor/ttfunk/lib/ttfunk/table/post/format40.rb +0 -17
  204. data/vendor/ttfunk/lib/ttfunk/table/simple.rb +0 -14
@@ -0,0 +1,45 @@
1
+ # encoding: utf-8
2
+
3
+ require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")
4
+
5
+ describe "#text_rendering_mode" do
6
+ it "should draw the text rendering mode to the document" do
7
+ create_pdf
8
+ @pdf.text_rendering_mode(:stroke) do
9
+ @pdf.text("hello world")
10
+ end
11
+ contents = PDF::Inspector::Text.analyze(@pdf.render)
12
+ contents.text_rendering_mode.first.should == 1
13
+ end
14
+ it "should not draw the text rendering mode to the document" +
15
+ " when the new mode matches the old" do
16
+ create_pdf
17
+ @pdf.text_rendering_mode(:fill) do
18
+ @pdf.text("hello world")
19
+ end
20
+ contents = PDF::Inspector::Text.analyze(@pdf.render)
21
+ contents.text_rendering_mode.should.be.empty
22
+ end
23
+ it "should restore character spacing to 0" do
24
+ create_pdf
25
+ @pdf.text_rendering_mode(:stroke) do
26
+ @pdf.text("hello world")
27
+ end
28
+ contents = PDF::Inspector::Text.analyze(@pdf.render)
29
+ contents.text_rendering_mode.should == [1,0]
30
+ end
31
+ it "should function as an accessor when no parameter given" do
32
+ create_pdf
33
+ @pdf.text_rendering_mode(:fill_stroke) do
34
+ @pdf.text("hello world")
35
+ @pdf.text_rendering_mode.should == :fill_stroke
36
+ end
37
+ @pdf.text_rendering_mode.should == :fill
38
+ end
39
+ it "should raise an exception when passed an invalid mode" do
40
+ create_pdf
41
+ lambda { @pdf.text_rendering_mode(-1) }.should.raise(ArgumentError)
42
+ lambda { @pdf.text_rendering_mode(8) }.should.raise(ArgumentError)
43
+ lambda { @pdf.text_rendering_mode(:flil) }.should.raise(ArgumentError)
44
+ end
45
+ end
data/spec/text_spec.rb CHANGED
@@ -16,7 +16,15 @@ describe "#height_of" do
16
16
  original_y = @pdf.y
17
17
  @pdf.text("Foo")
18
18
  new_y = @pdf.y
19
- @pdf.height_of("Foo", :width => 300).should.be.close(original_y - new_y, 0.0001)
19
+ @pdf.height_of("Foo").should.be.close(original_y - new_y, 0.0001)
20
+ end
21
+
22
+ it "should omit the gap below the last descender if :final_gap => false " +
23
+ "is given" do
24
+ original_y = @pdf.y
25
+ @pdf.text("Foo", :final_gap => false)
26
+ new_y = @pdf.y
27
+ @pdf.height_of("Foo", :final_gap => false).should.be.close(original_y - new_y, 0.0001)
20
28
  end
21
29
 
22
30
  it "should raise CannotFit if a too-small width is given" do
@@ -52,6 +60,35 @@ describe "#text" do
52
60
  }.should.not.raise(TypeError)
53
61
  end
54
62
 
63
+ it "should allow drawing empty strings to the page" do
64
+ @pdf.text " "
65
+ text = PDF::Inspector::Text.analyze(@pdf.render)
66
+ # If anything is rendered to the page, it should be whitespace.
67
+ text.strings.each { |str| str.should =~ /\A\s*\z/ }
68
+ end
69
+
70
+ it "should correctly render empty paragraphs" do
71
+ @pdf.text "text\n\ntext"
72
+ text = PDF::Inspector::Text.analyze(@pdf.render)
73
+ @pdf.page_count.should == 1
74
+ text.strings.reject{ |s| s.empty? }.should == ["text", "text"]
75
+ end
76
+
77
+ it "should correctly render empty paragraphs with :indent_paragraphs" do
78
+ @pdf.text "text\n\ntext", :indent_paragraphs => 5
79
+ text = PDF::Inspector::Text.analyze(@pdf.render)
80
+ @pdf.page_count.should == 1
81
+ text.strings.reject{ |s| s.empty? }.should == ["text", "text"]
82
+ end
83
+
84
+ it "should correctly render strings ending with empty paragraphs and " +
85
+ ":inline_format and :indent_paragraphs" do
86
+ @pdf.text "text\n\n", :inline_format => true, :indent_paragraphs => 5
87
+ text = PDF::Inspector::Text.analyze(@pdf.render)
88
+ @pdf.page_count.should == 1
89
+ text.strings.should == ["text"]
90
+ end
91
+
55
92
  it "should default to use kerning information" do
56
93
  @pdf.text "hello world"
57
94
  text = PDF::Inspector::Text.analyze(@pdf.render)
@@ -64,7 +101,7 @@ describe "#text" do
64
101
  text.kerned[0].should.be false
65
102
  end
66
103
 
67
- it "should be able to disable kerning document wide" do
104
+ it "should be able to disable kerning document-wide" do
68
105
  @pdf.default_kerning(false)
69
106
  @pdf.default_kerning = false
70
107
  @pdf.text "hello world"
@@ -72,7 +109,7 @@ describe "#text" do
72
109
  text.kerned[0].should.be false
73
110
  end
74
111
 
75
- it "option should be able to override document wide kerning disabling" do
112
+ it "option should be able to override document-wide kerning disabling" do
76
113
  @pdf.default_kerning = false
77
114
  @pdf.text "hello world", :kerning => true
78
115
  text = PDF::Inspector::Text.analyze(@pdf.render)
@@ -120,16 +157,16 @@ describe "#text" do
120
157
  @pdf.y.should.be.close(position - 3*@pdf.font.height, 0.0001)
121
158
  end
122
159
 
123
- it "should advance down the document based on font ascender only "+
124
- "if final_gap is given" do
160
+ it "should advance only to the bottom of the final descender "+
161
+ "if final_gap is false" do
125
162
  position = @pdf.y
126
163
  @pdf.text "Foo", :final_gap => false
127
164
 
128
- @pdf.y.should.be.close(position - @pdf.font.ascender, 0.0001)
165
+ @pdf.y.should.be.close(position - @pdf.font.ascender - @pdf.font.descender, 0.0001)
129
166
 
130
167
  position = @pdf.y
131
168
  @pdf.text "Foo\nBar\nBaz", :final_gap => false
132
- @pdf.y.should.be.close(position - 2*@pdf.font.height - @pdf.font.ascender, 0.0001)
169
+ @pdf.y.should.be.close(position - 2*@pdf.font.height - @pdf.font.ascender - @pdf.font.descender, 0.0001)
133
170
  end
134
171
 
135
172
  it "should be able to print text starting at the last line of a page" do
@@ -245,9 +282,10 @@ describe "#text" do
245
282
  @pdf.move_cursor_to(@pdf.font.height)
246
283
  @pdf.text(str + "\n" + str)
247
284
 
248
- # grab the text from the rendered PDF and ensure it matches
249
- text = PDF::Inspector::Text.analyze(@pdf.render)
250
- text.strings[1].should == str.strip
285
+ pages = PDF::Inspector::Page.analyze(@pdf.render).pages
286
+ pages.size.should == 2
287
+ pages[0][:strings].should == [str]
288
+ pages[1][:strings].should == [str]
251
289
  end
252
290
 
253
291
  it "should correctly render a string with higher bit characters across" +
@@ -256,9 +294,10 @@ describe "#text" do
256
294
  @pdf.move_cursor_to(@pdf.font.height)
257
295
  @pdf.text(str + "\n" + str, :indent_paragraphs => 20)
258
296
 
259
- # grab the text from the rendered PDF and ensure it matches
260
- text = PDF::Inspector::Text.analyze(@pdf.render)
261
- text.strings[1].should == str.strip
297
+ pages = PDF::Inspector::Page.analyze(@pdf.render).pages
298
+ pages.size.should == 2
299
+ pages[0][:strings].should == [str]
300
+ pages[1][:strings].should == [str]
262
301
  end
263
302
 
264
303
  if "spec".respond_to?(:encode!)
@@ -266,23 +305,27 @@ describe "#text" do
266
305
  it "should raise an exception when a utf-8 incompatible string is rendered" do
267
306
  str = "Blah \xDD"
268
307
  str.force_encoding("ASCII-8BIT")
269
- lambda { @pdf.text str }.should.raise(ArgumentError)
308
+ lambda { @pdf.text str }.should.raise(
309
+ Prawn::Errors::IncompatibleStringEncoding)
270
310
  end
271
311
  it "should not raise an exception when a shift-jis string is rendered" do
272
312
  datafile = "#{Prawn::BASEDIR}/data/shift_jis_text.txt"
273
313
  sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
274
314
  @pdf.font("#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf")
275
- lambda { @pdf.text sjis_str }.should.not.raise(ArgumentError)
315
+ lambda { @pdf.text sjis_str }.should.not.raise(
316
+ Prawn::Errors::IncompatibleStringEncoding)
276
317
  end
277
318
  else
278
319
  # Handle non utf-8 string encodings in a sane way on non-M17N aware VMs
279
320
  it "should raise an exception when a corrupt utf-8 string is rendered" do
280
321
  str = "Blah \xDD"
281
- lambda { @pdf.text str }.should.raise(ArgumentError)
322
+ lambda { @pdf.text str }.should.raise(
323
+ Prawn::Errors::IncompatibleStringEncoding)
282
324
  end
283
325
  it "should raise an exception when a shift-jis string is rendered" do
284
326
  sjis_str = File.read("#{Prawn::BASEDIR}/data/shift_jis_text.txt")
285
- lambda { @pdf.text sjis_str }.should.raise(ArgumentError)
327
+ lambda { @pdf.text sjis_str }.should.raise(
328
+ Prawn::Errors::IncompatibleStringEncoding)
286
329
  end
287
330
  end
288
331
 
@@ -2,42 +2,6 @@
2
2
 
3
3
  require File.join(File.expand_path(File.dirname(__FILE__)), "spec_helper")
4
4
 
5
- describe "#height_of_formatted with inline styling" do
6
- before(:each) { create_pdf }
7
-
8
- it "should return the height that would be required to print a" +
9
- "particular string of text" do
10
- original_y = @pdf.y
11
- array = [:text => "Foo"]
12
- @pdf.formatted_text(array)
13
- new_y = @pdf.y
14
- @pdf.height_of_formatted(array,
15
- :width => 300).should.be.close(original_y - new_y, 0.0001)
16
- end
17
-
18
- it "should raise CannotFit if a too-small width is given" do
19
- lambda do
20
- @pdf.height_of_formatted([:text => "hai"], :width => 1)
21
- end.should.raise(Prawn::Errors::CannotFit)
22
- end
23
-
24
- it "should raise NotImplementedError if :indent_paragraphs option is" +
25
- "provided" do
26
- lambda {
27
- @pdf.height_of_formatted([:text => "hai"], :width => 300,
28
- :indent_paragraphs => 60)
29
- }.should.raise(NotImplementedError)
30
- end
31
-
32
- it "should not raise Prawn::Errors::UnknownOption if :final_gap option" +
33
- "is provided" do
34
- lambda {
35
- @pdf.height_of_formatted([:text => "hai"], :width => 300,
36
- :final_gap => true)
37
- }.should.not.raise(Prawn::Errors::UnknownOption)
38
- end
39
- end
40
-
41
5
  describe "#formatted_text" do
42
6
  it "should draw text" do
43
7
  create_pdf
@@ -53,64 +17,6 @@ end
53
17
  describe "#text with inline styling" do
54
18
  before(:each) { create_pdf }
55
19
 
56
- it "should advance down the document based on font_height" do
57
- position = @pdf.y
58
- @pdf.text "Foo", :inline_format => true
59
-
60
- @pdf.y.should.be.close(position - @pdf.font.height, 0.0001)
61
-
62
- position = @pdf.y
63
- @pdf.text "Foo\nBar\nBaz", :inline_format => true
64
- @pdf.y.should.be.close(position - 3*@pdf.font.height, 0.0001)
65
- end
66
-
67
- it "should advance down the document based on font_height" +
68
- " with size option" do
69
- position = @pdf.y
70
- @pdf.text "Foo", :size => 15, :inline_format => true
71
-
72
- @pdf.font_size = 15
73
- @pdf.y.should.be.close(position - @pdf.font.height, 0.0001)
74
-
75
- position = @pdf.y
76
- @pdf.text "Foo\nBar\nBaz", :inline_format => true
77
- @pdf.y.should.be.close(position - 3*@pdf.font.height, 0.0001)
78
- end
79
-
80
- it "should advance down the document based on font_height" +
81
- " with leading option" do
82
- position = @pdf.y
83
- leading = 2
84
- @pdf.text "Foo", :leading => leading, :inline_format => true
85
-
86
- @pdf.y.should.be.close(position - @pdf.font.height - leading, 0.0001)
87
-
88
- position = @pdf.y
89
- @pdf.text "Foo\nBar\nBaz", :inline_format => true
90
- @pdf.y.should.be.close(position - 3*@pdf.font.height, 0.0001)
91
- end
92
-
93
- it "should advance down the document based on font ascender only "+
94
- "if final_gap is given" do
95
- position = @pdf.y
96
- @pdf.text "Foo", :final_gap => false, :inline_format => true
97
-
98
- @pdf.y.should.be.close(position - @pdf.font.ascender, 0.0001)
99
-
100
- position = @pdf.y
101
- @pdf.text "Foo\nBar\nBaz", :final_gap => false, :inline_format => true
102
- @pdf.y.should.be.close(position -
103
- 2*@pdf.font.height -
104
- @pdf.font.ascender, 0.0001)
105
- end
106
-
107
- it "should be able to print text starting at the last line of a page" do
108
- @pdf.move_cursor_to(@pdf.font.height)
109
- @pdf.text("hello world", :inline_format => true)
110
- pages = PDF::Inspector::Page.analyze(@pdf.render).pages
111
- pages.size.should == 1
112
- end
113
-
114
20
  it "should automatically move to a new page if the tallest fragment" +
115
21
  " on the next line won't fit in the available space" do
116
22
  create_pdf
@@ -121,73 +27,9 @@ describe "#text with inline styling" do
121
27
  pages.size.should == 2
122
28
  end
123
29
 
124
- it "should raise an exception when an unknown font is used" do
125
- lambda { @pdf.font "Pao bu" }.should.raise(Prawn::Errors::UnknownFont)
126
- end
127
-
128
- it "should correctly render a utf-8 string when using a built-in font" do
129
- str = "©" # copyright symbol
130
- @pdf.text str, :inline_format => true
131
-
132
- # grab the text from the rendered PDF and ensure it matches
133
- text = PDF::Inspector::Text.analyze(@pdf.render)
134
- text.strings.first.should == str
135
- end
136
-
137
- it "should correctly render a string with higher bit characters across" +
138
- " a page break when using a built-in font" do
139
- str = "©"
140
- @pdf.move_cursor_to(@pdf.font.height)
141
- @pdf.text(str + "\n" + str, :inline_format => true)
142
-
143
- # grab the text from the rendered PDF and ensure it matches
144
- text = PDF::Inspector::Text.analyze(@pdf.render)
145
- text.strings[1].should == str.strip
146
- end
147
-
148
- it "should correctly render a string with higher bit characters across" +
149
- " a page break when using a built-in font and :indent_paragraphs option" do
150
- str = "©"
151
- @pdf.move_cursor_to(@pdf.font.height)
152
- @pdf.text(str + "\n" + str,
153
- :indent_paragraphs => 20,
154
- :inline_format => true)
155
-
156
- # grab the text from the rendered PDF and ensure it matches
157
- text = PDF::Inspector::Text.analyze(@pdf.render)
158
- text.strings[1].should == str.strip
159
- end
160
-
161
- if "spec".respond_to?(:encode!)
162
- # Handle non utf-8 string encodings in a sane way on M17N aware VMs
163
- it "should raise an exception when a utf-8 incompatible string is rendered" do
164
- str = "Blah \xDD"
165
- str.force_encoding("ASCII-8BIT")
166
- lambda { @pdf.text str,
167
- :inline_format => true }.should.raise(ArgumentError)
168
- end
169
- it "should not raise an exception when a shift-jis string is rendered" do
170
- datafile = "#{Prawn::BASEDIR}/data/shift_jis_text.txt"
171
- sjis_str = File.open(datafile, "r:shift_jis") { |f| f.gets }
172
- @pdf.font_families["gkai00mp"] = {
173
- :normal => { :file => "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf",
174
- :font => "gkai00mp" }
175
- }
176
- @pdf.font("gkai00mp")
177
- lambda { @pdf.text sjis_str,
178
- :inline_format => true }.should.not.raise(ArgumentError)
179
- end
180
- else
181
- # Handle non utf-8 string encodings in a sane way on non-M17N aware VMs
182
- it "should raise an exception when a corrupt utf-8 string is rendered" do
183
- str = "Blah \xDD"
184
- lambda { @pdf.text str,
185
- :inline_format => true }.should.raise(ArgumentError)
186
- end
187
- it "should raise an exception when a shift-jis string is rendered" do
188
- sjis_str = File.read("#{Prawn::BASEDIR}/data/shift_jis_text.txt")
189
- lambda { @pdf.text sjis_str,
190
- :inline_format => true }.should.raise(ArgumentError)
191
- end
30
+ it "should embed links as literal strings" do
31
+ @pdf.text "<link href='http://wiki.github.com/sandal/prawn/'>wiki</link>",
32
+ :inline_format => true
33
+ @pdf.render.should =~ %r{/URI\s+\(http://wiki\.github\.com}
192
34
  end
193
35
  end
metadata CHANGED
@@ -1,22 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1657703402
5
- prerelease: true
4
+ hash: 49
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 11
9
9
  - 1
10
- - pre
11
- version: 0.11.1.pre
10
+ version: 0.11.1
12
11
  platform: ruby
13
12
  authors:
14
13
  - Gregory Brown
14
+ - Brad Ediger
15
+ - Daniel Nelson
16
+ - Jonathen Greenberg
17
+ - James Healy
15
18
  autorequire:
16
19
  bindir: bin
17
20
  cert_chain: []
18
21
 
19
- date: 2010-08-17 00:00:00 -04:00
22
+ date: 2011-04-03 00:00:00 -05:00
20
23
  default_executable:
21
24
  dependencies:
22
25
  - !ruby/object:Gem::Dependency
@@ -27,16 +30,37 @@ dependencies:
27
30
  requirements:
28
31
  - - ">="
29
32
  - !ruby/object:Gem::Version
30
- hash: 61
33
+ hash: 59
31
34
  segments:
32
35
  - 0
33
- - 8
34
- - 1
35
- version: 0.8.1
36
+ - 9
37
+ - 0
38
+ version: 0.9.0
36
39
  type: :runtime
37
40
  version_requirements: *id001
41
+ - !ruby/object:Gem::Dependency
42
+ name: ttfunk
43
+ prerelease: false
44
+ requirement: &id002 !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ~>
48
+ - !ruby/object:Gem::Version
49
+ hash: 23
50
+ segments:
51
+ - 1
52
+ - 0
53
+ - 0
54
+ version: 1.0.0
55
+ type: :runtime
56
+ version_requirements: *id002
38
57
  description: " Prawn is a fast, tiny, and nimble PDF generator for Ruby\n"
39
- email: " gregory.t.brown@gmail.com"
58
+ email:
59
+ - gregory.t.brown@gmail.com
60
+ - brad@bradediger.com
61
+ - dnelson@bluejade.com
62
+ - greenberg@entryway.net
63
+ - jimmy@deefa.com
40
64
  executables: []
41
65
 
42
66
  extensions: []
@@ -47,289 +71,252 @@ extra_rdoc_files:
47
71
  - LICENSE
48
72
  - COPYING
49
73
  files:
50
- - examples/grid/column_gutter_grid.rb
51
- - examples/grid/show_grid.rb
52
- - examples/grid/multi_boxes.rb
53
- - examples/grid/bounding_boxes.rb
54
- - examples/grid/simple_grid.rb
55
- - examples/m17n/utf8.rb
56
- - examples/m17n/euro.rb
57
- - examples/m17n/win_ansi_charset.rb
58
- - examples/m17n/sjis.rb
59
- - examples/m17n/chinese_text_wrapping.rb
60
- - examples/general/outlines.rb
61
- - examples/general/page_geometry.rb
62
- - examples/general/context_sensitive_headers.rb
63
- - examples/general/canvas.rb
64
- - examples/general/repeaters.rb
65
- - examples/general/page_numbering.rb
66
- - examples/general/background.rb
67
- - examples/general/stamp.rb
68
- - examples/general/templates.rb
69
- - examples/general/multi_page_layout.rb
70
- - examples/general/float.rb
71
- - examples/general/measurement_units.rb
72
- - examples/general/metadata-info.rb
73
- - examples/general/margin.rb
74
+ - examples/example_helper.rb
75
+ - examples/bounding_box/stretched_nesting.rb
76
+ - examples/bounding_box/bounding_boxes.rb
77
+ - examples/bounding_box/indentation.rb
78
+ - examples/bounding_box/russian_boxes.rb
79
+ - examples/table/multi_page_table.rb
80
+ - examples/table/header.rb
81
+ - examples/table/checkerboard.rb
82
+ - examples/table/inline_format_table.rb
83
+ - examples/table/borders.rb
84
+ - examples/table/simple_table.rb
85
+ - examples/table/subtable.rb
86
+ - examples/table/bill.rb
87
+ - examples/table/widths.rb
88
+ - examples/table/cell.rb
89
+ - examples/security/hello_foo.rb
74
90
  - examples/text/span.rb
75
- - examples/text/text_flow.rb
76
91
  - examples/text/simple_text_ttf.rb
77
- - examples/text/alignment.rb
92
+ - examples/text/inline_format.rb
78
93
  - examples/text/font_size.rb
79
- - examples/text/font_calculations.rb
80
- - examples/text/dfont.rb
81
- - examples/text/simple_text.rb
82
- - examples/text/indent_paragraphs.rb
83
- - examples/text/rotated.rb
94
+ - examples/text/text_flow.rb
84
95
  - examples/text/family_based_styling.rb
85
- - examples/text/shaped_text_box.rb
86
- - examples/text/character_spacing.rb
87
96
  - examples/text/text_box_returning_excess.rb
97
+ - examples/text/alignment.rb
98
+ - examples/text/shaped_text_box.rb
99
+ - examples/text/font_calculations.rb
88
100
  - examples/text/text_box.rb
101
+ - examples/text/rotated.rb
102
+ - examples/text/indent_paragraphs.rb
103
+ - examples/text/simple_text.rb
89
104
  - examples/text/hyphenation.rb
105
+ - examples/text/character_spacing.rb
106
+ - examples/text/rendering_mode.rb
107
+ - examples/text/dfont.rb
90
108
  - examples/text/kerning.rb
91
- - examples/text/inline_format.rb
92
- - examples/example_helper.rb
93
- - examples/table/checkerboard.rb
94
- - examples/table/inline_format_table.rb
95
- - examples/table/subtable.rb
96
- - examples/table/simple_table.rb
97
- - examples/table/widths.rb
98
- - examples/table/multi_page_table.rb
99
- - examples/table/bill.rb
100
- - examples/table/header.rb
101
- - examples/table/cell.rb
102
- - examples/security/hello_foo.rb
103
- - examples/bounding_box/stretched_nesting.rb
104
- - examples/bounding_box/indentation.rb
105
- - examples/bounding_box/russian_boxes.rb
106
- - examples/bounding_box/bounding_boxes.rb
107
- - examples/graphics/stroke_bounds.rb
108
- - examples/graphics/basic_images.rb
109
- - examples/graphics/transformations.rb
110
- - examples/graphics/image_flow.rb
111
- - examples/graphics/image_fit.rb
112
- - examples/graphics/png_types.rb
109
+ - examples/general/canvas.rb
110
+ - examples/general/measurement_units.rb
111
+ - examples/general/templates.rb
112
+ - examples/general/repeaters.rb
113
+ - examples/general/context_sensitive_headers.rb
114
+ - examples/general/page_numbering.rb
115
+ - examples/general/multi_page_layout.rb
116
+ - examples/general/float.rb
117
+ - examples/general/page_geometry.rb
118
+ - examples/general/margin.rb
119
+ - examples/general/outlines.rb
120
+ - examples/general/background.rb
121
+ - examples/general/metadata-info.rb
122
+ - examples/general/stamp.rb
123
+ - examples/general/page_templates.rb
124
+ - examples/graphics/line.rb
113
125
  - examples/graphics/ruport_style_helpers.rb
114
- - examples/graphics/hexagon.rb
126
+ - examples/graphics/image_position.rb
115
127
  - examples/graphics/polygons.rb
116
- - examples/graphics/line.rb
117
- - examples/graphics/cmyk.rb
128
+ - examples/graphics/gradient.rb
129
+ - examples/graphics/image_fit.rb
130
+ - examples/graphics/curves.rb
131
+ - examples/graphics/stroke_bounds.rb
132
+ - examples/graphics/transformations.rb
118
133
  - examples/graphics/rounded_rectangle.rb
119
- - examples/graphics/remote_images.rb
120
134
  - examples/graphics/transparency.rb
121
135
  - examples/graphics/stroke_cap_and_join.rb
122
- - examples/graphics/stroke_dash.rb
123
- - examples/graphics/curves.rb
124
- - examples/graphics/image_position.rb
136
+ - examples/graphics/png_types.rb
137
+ - examples/graphics/cmyk.rb
125
138
  - examples/graphics/rounded_polygons.rb
139
+ - examples/graphics/hexagon.rb
140
+ - examples/graphics/remote_images.rb
141
+ - examples/graphics/image_flow.rb
142
+ - examples/graphics/stroke_dash.rb
143
+ - examples/graphics/basic_images.rb
144
+ - examples/grid/multi_boxes.rb
145
+ - examples/grid/bounding_boxes.rb
146
+ - examples/grid/simple_grid.rb
147
+ - examples/grid/show_grid.rb
148
+ - examples/grid/column_gutter_grid.rb
149
+ - examples/m17n/euro.rb
150
+ - examples/m17n/utf8.rb
151
+ - examples/m17n/sjis.rb
152
+ - examples/m17n/full_win_ansi_character_list.rb
153
+ - examples/m17n/chinese_text_wrapping.rb
154
+ - examples/m17n/win_ansi_charset.rb
126
155
  - lib/prawn.rb
127
- - lib/prawn/text.rb
128
- - lib/prawn/measurements.rb
156
+ - lib/prawn/core.rb
129
157
  - lib/prawn/errors.rb
130
- - lib/prawn/document.rb
131
- - lib/prawn/security.rb
132
- - lib/prawn/font.rb
133
- - lib/prawn/text/box.rb
134
- - lib/prawn/text/formatted.rb
135
- - lib/prawn/text/formatted/fragment.rb
136
- - lib/prawn/text/formatted/box.rb
137
- - lib/prawn/text/formatted/parser.rb
138
- - lib/prawn/font/afm.rb
139
- - lib/prawn/font/dfont.rb
140
- - lib/prawn/font/ttf.rb
158
+ - lib/prawn/text.rb
159
+ - lib/prawn/images.rb
160
+ - lib/prawn/core/object_store.rb
161
+ - lib/prawn/core/byte_string.rb
141
162
  - lib/prawn/core/text.rb
142
- - lib/prawn/core/annotations.rb
163
+ - lib/prawn/core/pdf_object.rb
164
+ - lib/prawn/core/document_state.rb
165
+ - lib/prawn/core/destinations.rb
143
166
  - lib/prawn/core/reference.rb
144
- - lib/prawn/core/text/wrap.rb
167
+ - lib/prawn/core/annotations.rb
168
+ - lib/prawn/core/page.rb
169
+ - lib/prawn/core/name_tree.rb
145
170
  - lib/prawn/core/text/formatted/wrap.rb
146
171
  - lib/prawn/core/text/formatted/arranger.rb
147
172
  - lib/prawn/core/text/formatted/line_wrap.rb
148
- - lib/prawn/core/text/line_wrap.rb
149
- - lib/prawn/core/document_state.rb
150
- - lib/prawn/core/pdf_object.rb
151
- - lib/prawn/core/byte_string.rb
152
- - lib/prawn/core/page.rb
153
- - lib/prawn/core/destinations.rb
154
- - lib/prawn/core/object_store.rb
155
173
  - lib/prawn/core/literal_string.rb
156
- - lib/prawn/core/name_tree.rb
157
- - lib/prawn/layout.rb
158
- - lib/prawn/table.rb
174
+ - lib/prawn/measurements.rb
175
+ - lib/prawn/compatibility.rb
176
+ - lib/prawn/repeater.rb
177
+ - lib/prawn/measurement_extensions.rb
178
+ - lib/prawn/document.rb
159
179
  - lib/prawn/images/jpg.rb
160
180
  - lib/prawn/images/png.rb
161
181
  - lib/prawn/encoding.rb
162
- - lib/prawn/core.rb
163
- - lib/prawn/compatibility.rb
164
- - lib/prawn/stamp.rb
182
+ - lib/prawn/table/cells.rb
165
183
  - lib/prawn/table/cell/text.rb
166
- - lib/prawn/table/cell/subtable.rb
167
184
  - lib/prawn/table/cell/in_table.rb
168
- - lib/prawn/table/cells.rb
185
+ - lib/prawn/table/cell/subtable.rb
169
186
  - lib/prawn/table/cell.rb
170
- - lib/prawn/layout/grid.rb
171
- - lib/prawn/measurement_extensions.rb
172
- - lib/prawn/security/arcfour.rb
173
187
  - lib/prawn/graphics.rb
174
- - lib/prawn/images.rb
175
- - lib/prawn/outline.rb
188
+ - lib/prawn/security/arcfour.rb
176
189
  - lib/prawn/document/span.rb
177
- - lib/prawn/document/graphics_state.rb
178
- - lib/prawn/document/page_geometry.rb
179
190
  - lib/prawn/document/snapshot.rb
180
- - lib/prawn/document/internals.rb
181
191
  - lib/prawn/document/bounding_box.rb
182
- - lib/prawn/repeater.rb
183
- - lib/prawn/graphics/color.rb
192
+ - lib/prawn/document/internals.rb
193
+ - lib/prawn/document/page_geometry.rb
194
+ - lib/prawn/document/graphics_state.rb
195
+ - lib/prawn/document/column_box.rb
196
+ - lib/prawn/layout/grid.rb
197
+ - lib/prawn/text/formatted/parser.rb
198
+ - lib/prawn/text/formatted/fragment.rb
199
+ - lib/prawn/text/formatted/box.rb
200
+ - lib/prawn/text/box.rb
201
+ - lib/prawn/text/formatted.rb
202
+ - lib/prawn/font/ttf.rb
203
+ - lib/prawn/font/afm.rb
204
+ - lib/prawn/font/dfont.rb
184
205
  - lib/prawn/graphics/join_style.rb
185
- - lib/prawn/graphics/dash.rb
206
+ - lib/prawn/graphics/gradient.rb
207
+ - lib/prawn/graphics/transformation.rb
186
208
  - lib/prawn/graphics/cap_style.rb
187
209
  - lib/prawn/graphics/transparency.rb
188
- - lib/prawn/graphics/transformation.rb
189
- - spec/text_with_inline_formatting_spec.rb
190
- - spec/name_tree_spec.rb
191
- - spec/document_spec.rb
192
- - spec/transparency_spec.rb
193
- - spec/png_spec.rb
194
- - spec/outline_spec.rb
195
- - spec/text_at_spec.rb
196
- - spec/security_spec.rb
197
- - spec/measurement_units_spec.rb
198
- - spec/jpg_spec.rb
199
- - spec/span_spec.rb
200
- - spec/text_box_spec.rb
201
- - spec/repeater_spec.rb
202
- - spec/stamp_spec.rb
203
- - spec/stroke_styles_spec.rb
204
- - spec/text_spec.rb
205
- - spec/formatted_text_arranger_spec.rb
206
- - spec/destinations_spec.rb
210
+ - lib/prawn/graphics/color.rb
211
+ - lib/prawn/graphics/dash.rb
212
+ - lib/prawn/layout.rb
213
+ - lib/prawn/stamp.rb
214
+ - lib/prawn/table.rb
215
+ - lib/prawn/outline.rb
216
+ - lib/prawn/font.rb
217
+ - lib/prawn/security.rb
207
218
  - spec/text_spacing_spec.rb
208
- - spec/bounding_box_spec.rb
209
- - spec/pdf_object_spec.rb
210
219
  - spec/annotations_spec.rb
211
- - spec/template_spec.rb
212
- - spec/formatted_text_fragment_spec.rb
213
- - spec/reference_spec.rb
220
+ - spec/jpg_spec.rb
221
+ - spec/object_store_spec.rb
222
+ - spec/snapshot_spec.rb
223
+ - spec/measurement_units_spec.rb
214
224
  - spec/inline_formatted_text_parser_spec.rb
225
+ - spec/reference_spec.rb
226
+ - spec/graphics_spec.rb
227
+ - spec/stamp_spec.rb
228
+ - spec/bounding_box_spec.rb
229
+ - spec/transparency_spec.rb
230
+ - spec/spec_helper.rb
231
+ - spec/document_spec.rb
215
232
  - spec/font_spec.rb
233
+ - spec/text_box_spec.rb
234
+ - spec/text_with_inline_formatting_spec.rb
216
235
  - spec/images_spec.rb
217
- - spec/cell_spec.rb
218
- - spec/snapshot_spec.rb
219
- - spec/table_spec.rb
236
+ - spec/text_at_spec.rb
237
+ - spec/destinations_spec.rb
238
+ - spec/png_spec.rb
239
+ - spec/name_tree_spec.rb
240
+ - spec/formatted_text_arranger_spec.rb
220
241
  - spec/line_wrap_spec.rb
242
+ - spec/template_spec.rb
243
+ - spec/formatted_text_fragment_spec.rb
244
+ - spec/span_spec.rb
245
+ - spec/extensions/mocha.rb
246
+ - spec/text_rendering_mode_spec.rb
247
+ - spec/outline_spec.rb
248
+ - spec/cell_spec.rb
249
+ - spec/stroke_styles_spec.rb
221
250
  - spec/formatted_text_box_spec.rb
222
- - spec/graphics_spec.rb
223
- - spec/spec_helper.rb
251
+ - spec/text_spec.rb
252
+ - spec/pdf_object_spec.rb
253
+ - spec/security_spec.rb
254
+ - spec/table_spec.rb
255
+ - spec/repeater_spec.rb
224
256
  - spec/grid_spec.rb
225
- - spec/object_store_spec.rb
226
- - vendor/pdf-inspector/README
227
- - vendor/pdf-inspector/lib/pdf/inspector/text.rb
228
- - vendor/pdf-inspector/lib/pdf/inspector/xobject.rb
229
- - vendor/pdf-inspector/lib/pdf/inspector/page.rb
230
- - vendor/pdf-inspector/lib/pdf/inspector/extgstate.rb
231
- - vendor/pdf-inspector/lib/pdf/inspector/graphics.rb
232
- - vendor/pdf-inspector/lib/pdf/inspector.rb
233
- - vendor/ttfunk/data/fonts/comicsans.ttf
234
- - vendor/ttfunk/data/fonts/DejaVuSans.ttf
235
- - vendor/ttfunk/example.rb
236
- - vendor/ttfunk/lib/ttfunk.rb
237
- - vendor/ttfunk/lib/ttfunk/table.rb
238
- - vendor/ttfunk/lib/ttfunk/resource_file.rb
239
- - vendor/ttfunk/lib/ttfunk/subset/base.rb
240
- - vendor/ttfunk/lib/ttfunk/subset/unicode.rb
241
- - vendor/ttfunk/lib/ttfunk/subset/unicode_8bit.rb
242
- - vendor/ttfunk/lib/ttfunk/subset/windows_1252.rb
243
- - vendor/ttfunk/lib/ttfunk/subset/mac_roman.rb
244
- - vendor/ttfunk/lib/ttfunk/subset.rb
245
- - vendor/ttfunk/lib/ttfunk/subset_collection.rb
246
- - vendor/ttfunk/lib/ttfunk/table/head.rb
247
- - vendor/ttfunk/lib/ttfunk/table/hhea.rb
248
- - vendor/ttfunk/lib/ttfunk/table/glyf.rb
249
- - vendor/ttfunk/lib/ttfunk/table/glyf/compound.rb
250
- - vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
251
- - vendor/ttfunk/lib/ttfunk/table/post/format40.rb
252
- - vendor/ttfunk/lib/ttfunk/table/post/format20.rb
253
- - vendor/ttfunk/lib/ttfunk/table/post/format10.rb
254
- - vendor/ttfunk/lib/ttfunk/table/post/format25.rb
255
- - vendor/ttfunk/lib/ttfunk/table/post/format30.rb
256
- - vendor/ttfunk/lib/ttfunk/table/post.rb
257
- - vendor/ttfunk/lib/ttfunk/table/maxp.rb
258
- - vendor/ttfunk/lib/ttfunk/table/kern.rb
259
- - vendor/ttfunk/lib/ttfunk/table/os2.rb
260
- - vendor/ttfunk/lib/ttfunk/table/simple.rb
261
- - vendor/ttfunk/lib/ttfunk/table/name.rb
262
- - vendor/ttfunk/lib/ttfunk/table/loca.rb
263
- - vendor/ttfunk/lib/ttfunk/table/hmtx.rb
264
- - vendor/ttfunk/lib/ttfunk/table/cmap.rb
265
- - vendor/ttfunk/lib/ttfunk/table/kern/format0.rb
266
- - vendor/ttfunk/lib/ttfunk/table/cmap/subtable.rb
267
- - vendor/ttfunk/lib/ttfunk/table/cmap/format04.rb
268
- - vendor/ttfunk/lib/ttfunk/table/cmap/format00.rb
269
- - vendor/ttfunk/lib/ttfunk/reader.rb
270
- - vendor/ttfunk/lib/ttfunk/directory.rb
271
- - vendor/ttfunk/lib/ttfunk/encoding/windows_1252.rb
272
- - vendor/ttfunk/lib/ttfunk/encoding/mac_roman.rb
273
- - data/pdfs/encrypted.pdf
274
- - data/pdfs/two_hexagons.pdf
275
- - data/pdfs/hexagon.pdf
276
- - data/pdfs/resources_as_indirect_object.pdf
277
- - data/pdfs/indirect_reference.pdf
278
- - data/pdfs/contains_ttf_font.pdf
279
- - data/pdfs/complex_template.pdf
280
- - data/pdfs/nested_pages.pdf
281
- - data/pdfs/version_1_6.pdf
282
- - data/pdfs/page_without_mediabox.pdf
283
257
  - data/encodings/win_ansi.txt
284
- - data/images/ruport.png
285
- - data/images/dice_interlaced.png
258
+ - data/fonts/comicsans.ttf
259
+ - data/fonts/Times-Roman.afm
260
+ - data/fonts/Courier-Oblique.afm
261
+ - data/fonts/Helvetica-BoldOblique.afm
262
+ - data/fonts/Symbol.afm
263
+ - data/fonts/Helvetica-Bold.afm
264
+ - data/fonts/ZapfDingbats.afm
265
+ - data/fonts/Times-BoldItalic.afm
266
+ - data/fonts/Dustismo_Roman.ttf
267
+ - data/fonts/Courier.afm
268
+ - data/fonts/Helvetica-Oblique.afm
269
+ - data/fonts/Chalkboard.ttf
270
+ - data/fonts/Courier-Bold.afm
271
+ - data/fonts/Activa.ttf
272
+ - data/fonts/Courier-BoldOblique.afm
273
+ - data/fonts/Helvetica.afm
274
+ - data/fonts/DejaVuSans.ttf
275
+ - data/fonts/MustRead.html
276
+ - data/fonts/Times-Italic.afm
277
+ - data/fonts/gkai00mp.ttf
278
+ - data/fonts/Action Man.dfont
279
+ - data/fonts/Times-Bold.afm
280
+ - data/images/16bit.png
281
+ - data/images/page_white_text.alpha
286
282
  - data/images/tru256.bmp
287
- - data/images/16bit.dat
283
+ - data/images/arrow.png
288
284
  - data/images/letterhead.jpg
289
- - data/images/16bit.alpha
290
- - data/images/dice.dat
285
+ - data/images/barcode_issue.png
291
286
  - data/images/web-links.png
292
- - data/images/pigs.jpg
287
+ - data/images/ruport.png
288
+ - data/images/prawn.png
289
+ - data/images/dice.dat
293
290
  - data/images/page_white_text.dat
291
+ - data/images/dice.alpha
292
+ - data/images/dice_interlaced.png
293
+ - data/images/rails.png
294
+ - data/images/ruport_type0.png
295
+ - data/images/ruport_data.dat
294
296
  - data/images/fractal.jpg
297
+ - data/images/stef.jpg
295
298
  - data/images/web-links.dat
296
- - data/images/ruport_transparent.png
297
- - data/images/ruport_data.dat
298
- - data/images/arrow.png
299
- - data/images/ruport_type0.png
299
+ - data/images/arrow2.png
300
300
  - data/images/page_white_text.png
301
- - data/images/rails.png
302
- - data/images/16bit.png
301
+ - data/images/16bit.dat
302
+ - data/images/pigs.jpg
303
+ - data/images/ruport_transparent.png
303
304
  - data/images/dice.png
304
- - data/images/page_white_text.alpha
305
- - data/images/barcode_issue.png
306
- - data/images/arrow2.png
307
- - data/images/dice.alpha
308
305
  - data/images/rails.dat
309
- - data/images/stef.jpg
306
+ - data/images/16bit.alpha
310
307
  - data/shift_jis_text.txt
311
- - data/fonts/Courier-Oblique.afm
312
- - data/fonts/Dustismo_Roman.ttf
313
- - data/fonts/Courier.afm
314
- - data/fonts/Times-Bold.afm
315
- - data/fonts/Chalkboard.ttf
316
- - data/fonts/gkai00mp.ttf
317
- - data/fonts/Symbol.afm
318
- - data/fonts/MustRead.html
319
- - data/fonts/Helvetica-Bold.afm
320
- - data/fonts/comicsans.ttf
321
- - data/fonts/Courier-BoldOblique.afm
322
- - data/fonts/Times-Italic.afm
323
- - data/fonts/Times-BoldItalic.afm
324
- - data/fonts/Action Man.dfont
325
- - data/fonts/Courier-Bold.afm
326
- - data/fonts/Times-Roman.afm
327
- - data/fonts/Helvetica.afm
328
- - data/fonts/ZapfDingbats.afm
329
- - data/fonts/Activa.ttf
330
- - data/fonts/Helvetica-Oblique.afm
331
- - data/fonts/Helvetica-BoldOblique.afm
332
- - data/fonts/DejaVuSans.ttf
308
+ - data/pdfs/encrypted.pdf
309
+ - data/pdfs/nested_pages.pdf
310
+ - data/pdfs/resources_as_indirect_object.pdf
311
+ - data/pdfs/hexagon.pdf
312
+ - data/pdfs/form.pdf
313
+ - data/pdfs/complex_template.pdf
314
+ - data/pdfs/multipage_template.pdf
315
+ - data/pdfs/version_1_6.pdf
316
+ - data/pdfs/two_hexagons.pdf
317
+ - data/pdfs/page_without_mediabox.pdf
318
+ - data/pdfs/contains_ttf_font.pdf
319
+ - data/pdfs/indirect_reference.pdf
333
320
  - Rakefile
334
321
  - prawn.gemspec
335
322
  - HACKING
@@ -340,7 +327,20 @@ has_rdoc: true
340
327
  homepage: http://prawn.majesticseacreature.com
341
328
  licenses: []
342
329
 
343
- post_install_message:
330
+ post_install_message: |+
331
+
332
+ ********************************************
333
+
334
+
335
+ A lot has changed since 0.8.4
336
+
337
+ Please read the changelog for details:
338
+
339
+ https://github.com/sandal/prawn/wiki/CHANGELOG
340
+
341
+
342
+ ********************************************
343
+
344
344
  rdoc_options:
345
345
  - --title
346
346
  - Prawn Documentation
@@ -374,7 +374,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
374
374
  requirements: []
375
375
 
376
376
  rubyforge_project: prawn
377
- rubygems_version: 1.3.7
377
+ rubygems_version: 1.5.2
378
378
  signing_key:
379
379
  specification_version: 3
380
380
  summary: A fast and nimble PDF generator for Ruby