squib 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +162 -133
  3. data/Gemfile +4 -4
  4. data/README.md +630 -550
  5. data/RELEASE TODO.md +18 -18
  6. data/Rakefile +99 -99
  7. data/lib/squib.rb +32 -32
  8. data/lib/squib/api/background.rb +20 -19
  9. data/lib/squib/api/data.rb +100 -99
  10. data/lib/squib/api/image.rb +90 -76
  11. data/lib/squib/api/save.rb +149 -103
  12. data/lib/squib/api/settings.rb +35 -37
  13. data/lib/squib/api/shapes.rb +230 -228
  14. data/lib/squib/api/text.rb +65 -66
  15. data/lib/squib/api/text_embed.rb +96 -66
  16. data/lib/squib/args/arg_loader.rb +138 -0
  17. data/lib/squib/args/box.rb +55 -0
  18. data/lib/squib/args/card_range.rb +32 -0
  19. data/lib/squib/args/color_validator.rb +12 -0
  20. data/lib/squib/args/coords.rb +33 -0
  21. data/lib/squib/args/dir_validator.rb +16 -0
  22. data/lib/squib/args/draw.rb +92 -0
  23. data/lib/squib/args/embed_adjust.rb +25 -0
  24. data/lib/squib/args/embed_key.rb +17 -0
  25. data/lib/squib/args/hand_special.rb +37 -0
  26. data/lib/squib/args/input_file.rb +37 -0
  27. data/lib/squib/args/paint.rb +44 -0
  28. data/lib/squib/args/paragraph.rb +115 -0
  29. data/lib/squib/args/save_batch.rb +60 -0
  30. data/lib/squib/args/scale_box.rb +53 -0
  31. data/lib/squib/args/sheet.rb +72 -0
  32. data/lib/squib/args/showcase_special.rb +38 -0
  33. data/lib/squib/args/svg_special.rb +37 -0
  34. data/lib/squib/args/transform.rb +25 -0
  35. data/lib/squib/args/typographer.rb +117 -117
  36. data/lib/squib/card.rb +67 -67
  37. data/lib/squib/conf.rb +117 -111
  38. data/lib/squib/constants.rb +178 -178
  39. data/lib/squib/deck.rb +113 -111
  40. data/lib/squib/graphics/cairo_context_wrapper.rb +99 -53
  41. data/lib/squib/graphics/gradient_regex.rb +46 -46
  42. data/lib/squib/graphics/hand.rb +42 -43
  43. data/lib/squib/graphics/image.rb +76 -73
  44. data/lib/squib/graphics/save_doc.rb +103 -137
  45. data/lib/squib/graphics/save_images.rb +33 -33
  46. data/lib/squib/graphics/shapes.rb +119 -152
  47. data/lib/squib/graphics/showcase.rb +85 -88
  48. data/lib/squib/graphics/text.rb +176 -216
  49. data/lib/squib/layout_parser.rb +91 -89
  50. data/lib/squib/layouts/economy.yml +85 -0
  51. data/lib/squib/layouts/fantasy.yml +101 -0
  52. data/lib/squib/layouts/hand.yml +62 -46
  53. data/lib/squib/layouts/playing-card.yml +35 -18
  54. data/lib/squib/project_template/config.yml +45 -40
  55. data/lib/squib/version.rb +10 -10
  56. data/samples/color_shortcuts.rb +6 -0
  57. data/samples/csv_import.rb +18 -18
  58. data/samples/custom-config.yml +5 -5
  59. data/samples/custom_config.rb +18 -18
  60. data/samples/draw_shapes.rb +45 -35
  61. data/samples/embed_text.rb +88 -90
  62. data/samples/hand.rb +24 -24
  63. data/samples/layouts.rb +62 -61
  64. data/samples/layouts_builtin.rb +51 -0
  65. data/samples/load_images.rb +78 -64
  66. data/samples/ranges.rb +64 -53
  67. data/samples/sample.csv +2 -2
  68. data/samples/text_options.rb +102 -94
  69. data/spec/api/api_data_spec.rb +57 -50
  70. data/spec/api/api_settings_spec.rb +37 -17
  71. data/spec/args/box_spec.rb +127 -0
  72. data/spec/args/draw_spec.rb +95 -0
  73. data/spec/args/embed_key_spec.rb +13 -0
  74. data/spec/args/input_file_spec.rb +21 -0
  75. data/spec/args/paint_spec.rb +22 -0
  76. data/spec/args/paragraph_spec.rb +153 -0
  77. data/spec/args/range_spec.rb +36 -0
  78. data/spec/args/save_batch_spec.rb +51 -0
  79. data/spec/args/scale_box_spec.rb +71 -0
  80. data/spec/args/sheet_spec.rb +58 -0
  81. data/spec/args/showcase_special_spec.rb +15 -0
  82. data/spec/data/samples/autoscale_font.rb.txt +84 -87
  83. data/spec/data/samples/basic.rb.txt +209 -203
  84. data/spec/data/samples/cairo_access.rb.txt +2 -2
  85. data/spec/data/samples/config_text_markup.rb.txt +72 -75
  86. data/spec/data/samples/csv_import.rb.txt +76 -80
  87. data/spec/data/samples/custom_config.rb.txt +48 -49
  88. data/spec/data/samples/draw_shapes.rb.txt +100 -42
  89. data/spec/data/samples/embed_text.rb.txt +283 -295
  90. data/spec/data/samples/excel.rb.txt +162 -171
  91. data/spec/data/samples/gradients.rb.txt +79 -67
  92. data/spec/data/samples/hand.rb.txt +538 -514
  93. data/spec/data/samples/hello_world.rb.txt +36 -38
  94. data/spec/data/samples/load_images.rb.txt +41 -5
  95. data/spec/data/samples/portrait-landscape.rb.txt +49 -51
  96. data/spec/data/samples/ranges.rb.txt +460 -429
  97. data/spec/data/samples/saves.rb.txt +801 -785
  98. data/spec/data/samples/showcase.rb.txt +5910 -5906
  99. data/spec/data/samples/text_options.rb.txt +1125 -981
  100. data/spec/data/samples/tgc_proofs.rb.txt +81 -79
  101. data/spec/data/samples/units.rb.txt +18 -12
  102. data/spec/data/xlsx/with_macros.xlsm +0 -0
  103. data/spec/graphics/cairo_context_wrapper_spec.rb +84 -75
  104. data/spec/graphics/graphics_images_spec.rb +94 -85
  105. data/spec/graphics/graphics_save_doc_spec.rb +67 -65
  106. data/spec/samples/expected/hand.png +0 -0
  107. data/spec/samples/expected/hand_pretty.png +0 -0
  108. data/spec/samples/expected/layout_00.png +0 -0
  109. data/spec/samples/expected/load_images_00.png +0 -0
  110. data/spec/samples/expected/ranges_00.png +0 -0
  111. data/spec/samples/expected/shape_00.png +0 -0
  112. data/spec/samples/expected/showcase.png +0 -0
  113. data/spec/samples/expected/showcase2.png +0 -0
  114. data/spec/samples/expected/showcase_individual_00.png +0 -0
  115. data/spec/samples/expected/showcase_individual_01.png +0 -0
  116. data/spec/samples/expected/showcase_individual_02.png +0 -0
  117. data/spec/samples/expected/showcase_individual_03.png +0 -0
  118. data/spec/samples/expected/text_00.png +0 -0
  119. data/spec/samples/expected/text_01.png +0 -0
  120. data/spec/samples/expected/text_02.png +0 -0
  121. data/spec/samples/samples_regression_spec.rb +82 -82
  122. data/spec/spec_helper.rb +3 -2
  123. data/squib.gemspec +48 -48
  124. data/squib.sublime-project +42 -36
  125. metadata +61 -33
  126. data/lib/squib/input_helpers.rb +0 -238
  127. data/spec/api/api_image_spec.rb +0 -38
  128. data/spec/api/api_text_spec.rb +0 -37
  129. data/spec/graphics/graphics_shapes_spec.rb +0 -85
  130. data/spec/graphics/graphics_text_spec.rb +0 -164
  131. data/spec/input_helpers_spec.rb +0 -238
  132. data/spec/samples/expected/embed_multi_00.png +0 -0
  133. data/spec/samples/expected/embed_multi_01.png +0 -0
  134. data/spec/samples/expected/embed_multi_02.png +0 -0
  135. data/spec/samples/expected/ranges_01.png +0 -0
  136. data/spec/samples/expected/ranges_02.png +0 -0
@@ -1,295 +1,283 @@
1
- cairo: antialias=(["subpixel"])
2
- cairo: save([])
3
- cairo: set_source_color([:white])
4
- cairo: paint([])
5
- cairo: restore([])
6
- cairo: save([])
7
- cairo: rounded_rectangle([0, 0, 825, 1125, 0, 0])
8
- cairo: set_source_color([:black])
9
- cairo: set_line_width([2.0])
10
- cairo: stroke([])
11
- cairo: rounded_rectangle([0, 0, 825, 1125, 0, 0])
12
- cairo: set_source_color(["#0000"])
13
- cairo: fill([])
14
- cairo: restore([])
15
- cairo: save([])
16
- cairo: set_source_color([:black])
17
- cairo: translate([0, 0])
18
- cairo: rotate([0])
19
- cairo: move_to([0, 0])
20
- pango: font_description=([MockDouble])
21
- pango: text=(["Take 11 :tool: and gain 2 :health:. Take <b>2</b> :tool: <i>and gain 3 :purse: if level 2.</i>"])
22
- pango: width=([184320])
23
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
24
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
25
- pango: alignment=([#<Pango::Layout::Alignment left>])
26
- pango: justify=([false])
27
- pango: spacing=([0])
28
- cairo: update_pango_layout([MockDouble])
29
- pango: markup=(["Take 11 :tool: and gain 2 :health:. Take <b>2</b> :tool: <i>and gain 3 :purse: if level 2.</i>"])
30
- cairo: move_to([0, 0])
31
- cairo: update_pango_layout([MockDouble])
32
- cairo: show_pango_layout([MockDouble])
33
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
34
- cairo: set_source_color([:red])
35
- cairo: set_line_width([2.0])
36
- cairo: stroke([])
37
- cairo: restore([])
38
- cairo: save([])
39
- cairo: set_source_color([:black])
40
- cairo: translate([200, 0])
41
- cairo: rotate([0])
42
- cairo: move_to([0, 0])
43
- pango: font_description=([MockDouble])
44
- pango: text=(["Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:"])
45
- pango: width=([184320])
46
- pango: height=([307200])
47
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
48
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
49
- pango: alignment=([#<Pango::Layout::Alignment left>])
50
- pango: justify=([false])
51
- pango: spacing=([0])
52
- cairo: update_pango_layout([MockDouble])
53
- pango: markup=(["Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:"])
54
- cairo: move_to([0, 0.0])
55
- cairo: update_pango_layout([MockDouble])
56
- cairo: show_pango_layout([MockDouble])
57
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
58
- cairo: set_source_color([:cyan])
59
- cairo: set_line_width([2.0])
60
- cairo: stroke([])
61
- cairo: restore([])
62
- cairo: save([])
63
- cairo: set_source_color([:black])
64
- cairo: translate([400, 0])
65
- cairo: rotate([0])
66
- cairo: move_to([0, 0])
67
- pango: font_description=([MockDouble])
68
- pango: text=(["This :tool: aligns on the bottom properly. :purse:"])
69
- pango: width=([184320])
70
- pango: height=([307200])
71
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
72
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
73
- pango: alignment=([#<Pango::Layout::Alignment left>])
74
- pango: justify=([false])
75
- pango: spacing=([0])
76
- cairo: update_pango_layout([MockDouble])
77
- pango: markup=(["This :tool: aligns on the bottom properly. :purse:"])
78
- cairo: move_to([0, 0.0])
79
- cairo: update_pango_layout([MockDouble])
80
- cairo: show_pango_layout([MockDouble])
81
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
82
- cairo: set_source_color([:green])
83
- cairo: set_line_width([2.0])
84
- cairo: stroke([])
85
- cairo: restore([])
86
- cairo: save([])
87
- cairo: set_source_color([:black])
88
- cairo: translate([600, 0])
89
- cairo: rotate([0])
90
- cairo: move_to([0, 0])
91
- pango: font_description=([MockDouble])
92
- pango: text=(["Wrapping multiples: These are 1 :tool::tool::tool: and these are multiple :tool::tool: :tool::tool:"])
93
- pango: width=([184320])
94
- pango: height=([307200])
95
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
96
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
97
- pango: alignment=([#<Pango::Layout::Alignment left>])
98
- pango: justify=([false])
99
- pango: spacing=([0])
100
- cairo: update_pango_layout([MockDouble])
101
- pango: markup=(["Wrapping multiples: These are 1 :tool::tool::tool: and these are multiple :tool::tool: :tool::tool:"])
102
- cairo: move_to([0, 0.0])
103
- cairo: update_pango_layout([MockDouble])
104
- cairo: show_pango_layout([MockDouble])
105
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
106
- cairo: set_source_color([:cyan])
107
- cairo: set_line_width([2.0])
108
- cairo: stroke([])
109
- cairo: restore([])
110
- cairo: save([])
111
- cairo: set_source_color([:black])
112
- cairo: translate([0, 320])
113
- cairo: rotate([0])
114
- cairo: move_to([0, 0])
115
- pango: font_description=([MockDouble])
116
- pango: text=([":tool:Justify will :tool: work too, and :purse: with more words just for fun"])
117
- pango: width=([184320])
118
- pango: height=([307200])
119
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
120
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
121
- pango: alignment=([#<Pango::Layout::Alignment left>])
122
- pango: justify=([true])
123
- pango: spacing=([0])
124
- cairo: update_pango_layout([MockDouble])
125
- pango: markup=([":tool:Justify will :tool: work too, and :purse: with more words just for fun"])
126
- cairo: move_to([0, 0.0])
127
- cairo: update_pango_layout([MockDouble])
128
- cairo: show_pango_layout([MockDouble])
129
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
130
- cairo: set_source_color([:magenta])
131
- cairo: set_line_width([2.0])
132
- cairo: stroke([])
133
- cairo: restore([])
134
- cairo: save([])
135
- cairo: set_source_color([:black])
136
- cairo: translate([200, 320])
137
- cairo: rotate([0])
138
- cairo: move_to([0, 0])
139
- pango: font_description=([MockDouble])
140
- pango: text=(["Right-aligned works :tool: with :health: and :purse:"])
141
- pango: width=([184320])
142
- pango: height=([307200])
143
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
144
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
145
- pango: alignment=([#<Pango::Layout::Alignment right>])
146
- pango: justify=([false])
147
- pango: spacing=([0])
148
- cairo: update_pango_layout([MockDouble])
149
- pango: markup=(["Right-aligned works :tool: with :health: and :purse:"])
150
- cairo: move_to([0, 0.0])
151
- cairo: update_pango_layout([MockDouble])
152
- cairo: show_pango_layout([MockDouble])
153
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
154
- cairo: set_source_color([:magenta])
155
- cairo: set_line_width([2.0])
156
- cairo: stroke([])
157
- cairo: restore([])
158
- cairo: save([])
159
- cairo: set_source_color([:black])
160
- cairo: translate([400, 320])
161
- cairo: rotate([0])
162
- cairo: move_to([0, 0])
163
- pango: font_description=([MockDouble])
164
- pango: text=([":tool:Center-aligned works :tool: with :health: and :purse:"])
165
- pango: width=([184320])
166
- pango: height=([307200])
167
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
168
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
169
- pango: alignment=([#<Pango::Layout::Alignment center>])
170
- pango: justify=([false])
171
- pango: spacing=([0])
172
- cairo: update_pango_layout([MockDouble])
173
- pango: markup=([":tool:Center-aligned works :tool: with :health: and :purse:"])
174
- cairo: move_to([0, 0])
175
- cairo: update_pango_layout([MockDouble])
176
- cairo: show_pango_layout([MockDouble])
177
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
178
- cairo: set_source_color([:magenta])
179
- cairo: set_line_width([2.0])
180
- cairo: stroke([])
181
- cairo: restore([])
182
- cairo: save([])
183
- cairo: set_source_color([:black])
184
- cairo: translate([600, 320])
185
- cairo: rotate([0])
186
- cairo: move_to([0, 0])
187
- pango: font_description=([MockDouble])
188
- pango: text=(["Markup --- and typography replacements --- with \":tool:\" icons <i>won't</i> fail"])
189
- pango: markup=(["foo"])
190
- pango: width=([184320])
191
- pango: height=([307200])
192
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
193
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode end>])
194
- pango: alignment=([#<Pango::Layout::Alignment center>])
195
- pango: justify=([false])
196
- pango: spacing=([0])
197
- cairo: update_pango_layout([MockDouble])
198
- pango: markup=(["foo"])
199
- cairo: move_to([0, 0])
200
- cairo: update_pango_layout([MockDouble])
201
- cairo: show_pango_layout([MockDouble])
202
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
203
- cairo: set_source_color([:magenta])
204
- cairo: set_line_width([2.0])
205
- cairo: stroke([])
206
- cairo: restore([])
207
- surface: write_to_png(["_output/embed_00.png"])
208
- cairo: antialias=(["subpixel"])
209
- cairo: antialias=(["subpixel"])
210
- cairo: antialias=(["subpixel"])
211
- cairo: save([])
212
- cairo: set_source_color([:black])
213
- cairo: translate([0, 0])
214
- cairo: rotate([0])
215
- cairo: move_to([0, 0])
216
- pango font: size=([18432])
217
- pango: font_description=([MockDouble])
218
- pango: text=(["Take 1 :tool: and gain 2 :health:."])
219
- pango: width=([184320])
220
- pango: height=([307200])
221
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
222
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
223
- pango: alignment=([#<Pango::Layout::Alignment left>])
224
- pango: justify=([false])
225
- pango: spacing=([0])
226
- cairo: update_pango_layout([MockDouble])
227
- pango: markup=(["Take 1 :tool: and gain 2 :health:."])
228
- cairo: move_to([0, 0.0])
229
- cairo: update_pango_layout([MockDouble])
230
- cairo: show_pango_layout([MockDouble])
231
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
232
- cairo: set_source_color([:cyan])
233
- cairo: set_line_width([2.0])
234
- cairo: stroke([])
235
- cairo: restore([])
236
- cairo: save([])
237
- cairo: set_source_color([:black])
238
- cairo: translate([0, 0])
239
- cairo: rotate([0])
240
- cairo: move_to([0, 0])
241
- pango font: size=([32768])
242
- pango: font_description=([MockDouble])
243
- pango: text=(["Take 1 :tool: and gain 2 :health:."])
244
- pango: width=([184320])
245
- pango: height=([307200])
246
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
247
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
248
- pango: alignment=([#<Pango::Layout::Alignment left>])
249
- pango: justify=([false])
250
- pango: spacing=([0])
251
- cairo: update_pango_layout([MockDouble])
252
- pango: markup=(["Take 1 :tool: and gain 2 :health:."])
253
- cairo: move_to([0, 0.0])
254
- cairo: update_pango_layout([MockDouble])
255
- cairo: show_pango_layout([MockDouble])
256
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
257
- cairo: set_source_color([:cyan])
258
- cairo: set_line_width([2.0])
259
- cairo: stroke([])
260
- cairo: restore([])
261
- cairo: save([])
262
- cairo: set_source_color([:black])
263
- cairo: translate([0, 0])
264
- cairo: rotate([0])
265
- cairo: move_to([0, 0])
266
- pango font: size=([46080])
267
- pango: font_description=([MockDouble])
268
- pango: text=(["Take 1 :tool: and gain 2 :health:."])
269
- pango: width=([184320])
270
- pango: height=([307200])
271
- pango: wrap=([#<Pango::Layout::WrapMode word-char>])
272
- pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
273
- pango: alignment=([#<Pango::Layout::Alignment left>])
274
- pango: justify=([false])
275
- pango: spacing=([0])
276
- cairo: update_pango_layout([MockDouble])
277
- pango: markup=(["Take 1 :tool: and gain 2 :health:."])
278
- cairo: move_to([0, 0.0])
279
- cairo: update_pango_layout([MockDouble])
280
- cairo: show_pango_layout([MockDouble])
281
- cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
282
- cairo: set_source_color([:cyan])
283
- cairo: set_line_width([2.0])
284
- cairo: stroke([])
285
- cairo: restore([])
286
- surface: write_to_png(["_output/embed_multi_00.png"])
287
- surface: write_to_png(["_output/embed_multi_01.png"])
288
- surface: write_to_png(["_output/embed_multi_02.png"])
289
- cairo: set_source([MockDouble, 0, 0])
290
- cairo: paint([])
291
- cairo: set_source([MockDouble, 100, 0])
292
- cairo: paint([])
293
- cairo: set_source([MockDouble, 200, 0])
294
- cairo: paint([])
295
- surface: write_to_png(["_output/embed_multisheet_00.png"])
1
+ cairo: antialias=(["subpixel"])
2
+ cairo: save([])
3
+ cairo: set_source_color(["white"])
4
+ cairo: paint([])
5
+ cairo: restore([])
6
+ cairo: save([])
7
+ cairo: rounded_rectangle([0, 0, 825, 1125, 0, 0])
8
+ cairo: set_source_color(["#0000"])
9
+ cairo: fill_preserve([])
10
+ cairo: set_source_color(["black"])
11
+ cairo: set_line_width([2.0])
12
+ cairo: set_line_join([0])
13
+ cairo: set_line_cap([0])
14
+ cairo: set_dash([[]])
15
+ cairo: stroke([])
16
+ cairo: restore([])
17
+ cairo: save([])
18
+ cairo: set_source_color(["black"])
19
+ cairo: translate([0, 0])
20
+ cairo: rotate([0])
21
+ cairo: move_to([0, 0])
22
+ pango: font_description=([MockDouble])
23
+ pango: text=(["Take 11 :tool: and gain 2 :health:. Take <b>2</b> :tool: <i>and gain 3 :purse: if level 2.</i>"])
24
+ pango: width=([184320])
25
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
26
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
27
+ pango: alignment=([#<Pango::Layout::Alignment left>])
28
+ pango: justify=([false])
29
+ pango: markup=(["Take 11 :tool: and gain 2 :health:. Take <b>2</b> :tool: <i>and gain 3 :purse: if level 2.</i>"])
30
+ cairo: move_to([0, 0])
31
+ cairo: move_to([0, 0])
32
+ cairo: show_pango_layout([MockDouble])
33
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
34
+ cairo: set_source_color([:red])
35
+ cairo: set_line_width([2.0])
36
+ cairo: stroke([])
37
+ pango: ellipsized?([])
38
+ cairo: restore([])
39
+ cairo: save([])
40
+ cairo: set_source_color(["black"])
41
+ cairo: translate([200, 0])
42
+ cairo: rotate([0])
43
+ cairo: move_to([0, 0])
44
+ pango: font_description=([MockDouble])
45
+ pango: text=(["Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:"])
46
+ pango: width=([184320])
47
+ pango: height=([307200])
48
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
49
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
50
+ pango: alignment=([#<Pango::Layout::Alignment left>])
51
+ pango: justify=([false])
52
+ pango: markup=(["Middle align: Take 1 :tool: and gain 2 :health:. Take 2 :tool: and gain 3 :purse:"])
53
+ cairo: move_to([0, 0.0])
54
+ cairo: move_to([0, 0.0])
55
+ cairo: show_pango_layout([MockDouble])
56
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
57
+ cairo: set_source_color([:cyan])
58
+ cairo: set_line_width([2.0])
59
+ cairo: stroke([])
60
+ pango: ellipsized?([])
61
+ cairo: restore([])
62
+ cairo: save([])
63
+ cairo: set_source_color(["black"])
64
+ cairo: translate([400, 0])
65
+ cairo: rotate([0])
66
+ cairo: move_to([0, 0])
67
+ pango: font_description=([MockDouble])
68
+ pango: text=(["This :tool: aligns on the bottom properly. :purse:"])
69
+ pango: width=([184320])
70
+ pango: height=([307200])
71
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
72
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
73
+ pango: alignment=([#<Pango::Layout::Alignment left>])
74
+ pango: justify=([false])
75
+ pango: markup=(["This :tool: aligns on the bottom properly. :purse:"])
76
+ cairo: move_to([0, 0.0])
77
+ cairo: move_to([0, 0.0])
78
+ cairo: show_pango_layout([MockDouble])
79
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
80
+ cairo: set_source_color([:green])
81
+ cairo: set_line_width([2.0])
82
+ cairo: stroke([])
83
+ pango: ellipsized?([])
84
+ cairo: restore([])
85
+ cairo: save([])
86
+ cairo: set_source_color(["black"])
87
+ cairo: translate([600, 0])
88
+ cairo: rotate([0])
89
+ cairo: move_to([0, 0])
90
+ pango: font_description=([MockDouble])
91
+ pango: text=(["Wrapping multiples: These are 1 :tool::tool::tool: and these are multiple :tool::tool: :tool::tool:"])
92
+ pango: width=([184320])
93
+ pango: height=([307200])
94
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
95
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
96
+ pango: alignment=([#<Pango::Layout::Alignment left>])
97
+ pango: justify=([false])
98
+ pango: markup=(["Wrapping multiples: These are 1 :tool::tool::tool: and these are multiple :tool::tool: :tool::tool:"])
99
+ cairo: move_to([0, 0.0])
100
+ cairo: move_to([0, 0.0])
101
+ cairo: show_pango_layout([MockDouble])
102
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
103
+ cairo: set_source_color([:cyan])
104
+ cairo: set_line_width([2.0])
105
+ cairo: stroke([])
106
+ pango: ellipsized?([])
107
+ cairo: restore([])
108
+ cairo: save([])
109
+ cairo: set_source_color(["black"])
110
+ cairo: translate([0, 320])
111
+ cairo: rotate([0])
112
+ cairo: move_to([0, 0])
113
+ pango: font_description=([MockDouble])
114
+ pango: text=([":tool:Justify will :tool: work too, and :purse: with more words just for fun"])
115
+ pango: width=([184320])
116
+ pango: height=([307200])
117
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
118
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
119
+ pango: alignment=([#<Pango::Layout::Alignment left>])
120
+ pango: justify=([true])
121
+ pango: markup=([":tool:Justify will :tool: work too, and :purse: with more words just for fun"])
122
+ cairo: move_to([0, 0.0])
123
+ cairo: move_to([0, 0.0])
124
+ cairo: show_pango_layout([MockDouble])
125
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
126
+ cairo: set_source_color([:magenta])
127
+ cairo: set_line_width([2.0])
128
+ cairo: stroke([])
129
+ pango: ellipsized?([])
130
+ cairo: restore([])
131
+ cairo: save([])
132
+ cairo: set_source_color(["black"])
133
+ cairo: translate([200, 320])
134
+ cairo: rotate([0])
135
+ cairo: move_to([0, 0])
136
+ pango: font_description=([MockDouble])
137
+ pango: text=(["Right-aligned works :tool: with :health: and :purse:"])
138
+ pango: width=([184320])
139
+ pango: height=([307200])
140
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
141
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
142
+ pango: alignment=([#<Pango::Layout::Alignment right>])
143
+ pango: justify=([false])
144
+ pango: markup=(["Right-aligned works :tool: with :health: and :purse:"])
145
+ cairo: move_to([0, 0.0])
146
+ cairo: move_to([0, 0.0])
147
+ cairo: show_pango_layout([MockDouble])
148
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
149
+ cairo: set_source_color([:magenta])
150
+ cairo: set_line_width([2.0])
151
+ cairo: stroke([])
152
+ pango: ellipsized?([])
153
+ cairo: restore([])
154
+ cairo: save([])
155
+ cairo: set_source_color(["black"])
156
+ cairo: translate([400, 320])
157
+ cairo: rotate([0])
158
+ cairo: move_to([0, 0])
159
+ pango: font_description=([MockDouble])
160
+ pango: text=([":tool:Center-aligned works :tool: with :health: and :purse:"])
161
+ pango: width=([184320])
162
+ pango: height=([307200])
163
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
164
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
165
+ pango: alignment=([#<Pango::Layout::Alignment center>])
166
+ pango: justify=([false])
167
+ pango: markup=([":tool:Center-aligned works :tool: with :health: and :purse:"])
168
+ cairo: move_to([0, 0])
169
+ cairo: move_to([0, 0])
170
+ cairo: show_pango_layout([MockDouble])
171
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
172
+ cairo: set_source_color([:magenta])
173
+ cairo: set_line_width([2.0])
174
+ cairo: stroke([])
175
+ pango: ellipsized?([])
176
+ cairo: restore([])
177
+ cairo: save([])
178
+ cairo: set_source_color(["black"])
179
+ cairo: translate([600, 320])
180
+ cairo: rotate([0])
181
+ cairo: move_to([0, 0])
182
+ pango: font_description=([MockDouble])
183
+ pango: text=(["Markup --- and typography replacements --- with \":tool:\" icons <i>won't</i> fail"])
184
+ pango: markup=(["foo"])
185
+ pango: width=([184320])
186
+ pango: height=([307200])
187
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
188
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode end>])
189
+ pango: alignment=([#<Pango::Layout::Alignment center>])
190
+ pango: justify=([false])
191
+ pango: markup=(["foo"])
192
+ cairo: move_to([0, 0])
193
+ cairo: move_to([0, 0])
194
+ cairo: show_pango_layout([MockDouble])
195
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
196
+ cairo: set_source_color([:magenta])
197
+ cairo: set_line_width([2.0])
198
+ cairo: stroke([])
199
+ pango: ellipsized?([])
200
+ cairo: restore([])
201
+ surface: write_to_png(["_output/embed_00.png"])
202
+ cairo: antialias=(["subpixel"])
203
+ cairo: antialias=(["subpixel"])
204
+ cairo: antialias=(["subpixel"])
205
+ cairo: save([])
206
+ cairo: set_source_color(["black"])
207
+ cairo: translate([0, 0])
208
+ cairo: rotate([0])
209
+ cairo: move_to([0, 0])
210
+ pango font: size=([18432])
211
+ pango: font_description=([MockDouble])
212
+ pango: text=(["Take 1 :tool: and gain 2 :health:."])
213
+ pango: width=([184320])
214
+ pango: height=([307200])
215
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
216
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
217
+ pango: alignment=([#<Pango::Layout::Alignment left>])
218
+ pango: justify=([false])
219
+ pango: markup=(["Take 1 :tool: and gain 2 :health:."])
220
+ cairo: move_to([0, 0.0])
221
+ cairo: move_to([0, 0.0])
222
+ cairo: show_pango_layout([MockDouble])
223
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
224
+ cairo: set_source_color([:cyan])
225
+ cairo: set_line_width([2.0])
226
+ cairo: stroke([])
227
+ pango: ellipsized?([])
228
+ cairo: restore([])
229
+ cairo: save([])
230
+ cairo: set_source_color(["black"])
231
+ cairo: translate([0, 0])
232
+ cairo: rotate([0])
233
+ cairo: move_to([0, 0])
234
+ pango font: size=([26624])
235
+ pango: font_description=([MockDouble])
236
+ pango: text=(["Take 1 :tool: and gain 2 :health:."])
237
+ pango: width=([184320])
238
+ pango: height=([307200])
239
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
240
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
241
+ pango: alignment=([#<Pango::Layout::Alignment left>])
242
+ pango: justify=([false])
243
+ pango: markup=(["Take 1 :tool: and gain 2 :health:."])
244
+ cairo: move_to([0, 0.0])
245
+ cairo: move_to([0, 0.0])
246
+ cairo: show_pango_layout([MockDouble])
247
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
248
+ cairo: set_source_color([:cyan])
249
+ cairo: set_line_width([2.0])
250
+ cairo: stroke([])
251
+ pango: ellipsized?([])
252
+ cairo: restore([])
253
+ cairo: save([])
254
+ cairo: set_source_color(["black"])
255
+ cairo: translate([0, 0])
256
+ cairo: rotate([0])
257
+ cairo: move_to([0, 0])
258
+ pango font: size=([35840])
259
+ pango: font_description=([MockDouble])
260
+ pango: text=(["Take 1 :tool: and gain 2 :health:."])
261
+ pango: width=([184320])
262
+ pango: height=([307200])
263
+ pango: wrap=([#<Pango::Layout::WrapMode word-char>])
264
+ pango: ellipsize=([#<Pango::Layout::EllipsizeMode none>])
265
+ pango: alignment=([#<Pango::Layout::Alignment left>])
266
+ pango: justify=([false])
267
+ pango: markup=(["Take 1 :tool: and gain 2 :health:."])
268
+ cairo: move_to([0, 0.0])
269
+ cairo: move_to([0, 0.0])
270
+ cairo: show_pango_layout([MockDouble])
271
+ cairo: rounded_rectangle([0, 0, 0, 0, 0, 0])
272
+ cairo: set_source_color([:cyan])
273
+ cairo: set_line_width([2.0])
274
+ cairo: stroke([])
275
+ pango: ellipsized?([])
276
+ cairo: restore([])
277
+ cairo: set_source([MockDouble, 0, 0])
278
+ cairo: paint([])
279
+ cairo: set_source([MockDouble, 100, 0])
280
+ cairo: paint([])
281
+ cairo: set_source([MockDouble, 200, 0])
282
+ cairo: paint([])
283
+ surface: write_to_png(["_output/embed_multisheet_00.png"])