prawn-icon 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +54 -1
  3. data/GPLv2 +21 -22
  4. data/README.md +10 -10
  5. data/data/fonts/fab/LICENSE +34 -0
  6. data/data/fonts/fab/fa-brands.ttf +0 -0
  7. data/data/fonts/fab/fab.yml +333 -0
  8. data/data/fonts/far/LICENSE +34 -0
  9. data/data/fonts/far/fa-regular.ttf +0 -0
  10. data/data/fonts/far/far.yml +119 -0
  11. data/data/fonts/fas/LICENSE +34 -0
  12. data/data/fonts/fas/fa-solid.ttf +0 -0
  13. data/data/fonts/fas/fas.yml +503 -0
  14. data/data/fonts/pf/paymentfont-webfont.ttf +0 -0
  15. data/data/fonts/pf/pf.yml +118 -97
  16. data/examples/fas-beer-inline.png +0 -0
  17. data/examples/fas-beer.png +0 -0
  18. data/examples/fontawesome.rb +28 -20
  19. data/examples/foundation_icons.rb +1 -1
  20. data/examples/paymentfont.rb +1 -1
  21. data/lib/prawn/icon.rb +3 -200
  22. data/lib/prawn/icon/base.rb +19 -0
  23. data/lib/prawn/icon/errors.rb +21 -0
  24. data/lib/prawn/icon/font_data.rb +11 -13
  25. data/lib/prawn/icon/interface.rb +208 -0
  26. data/lib/prawn/icon/parser.rb +45 -53
  27. data/lib/prawn/icon/version.rb +1 -1
  28. data/prawn-icon.gemspec +8 -9
  29. data/spec/integration/icon_spec.rb +80 -60
  30. data/spec/spec_helper.rb +4 -0
  31. data/spec/support/parser_helper.rb +1 -1
  32. data/spec/support/pdf_helper.rb +1 -1
  33. data/spec/unit/base_spec.rb +15 -0
  34. data/spec/unit/errors/icon_key_empty_spec.rb +19 -0
  35. data/spec/unit/errors/icon_not_found_spec.rb +19 -0
  36. data/spec/unit/font_data_spec.rb +54 -73
  37. data/spec/unit/icon_spec.rb +20 -27
  38. data/spec/unit/parser_spec.rb +66 -63
  39. metadata +35 -41
  40. data/data/fonts/fa/LICENSE +0 -4
  41. data/data/fonts/fa/fa.yml +0 -676
  42. data/data/fonts/fa/fontawesome.ttf +0 -0
  43. data/data/fonts/octicon/LICENSE +0 -9
  44. data/data/fonts/octicon/octicon.yml +0 -192
  45. data/data/fonts/octicon/octicons.ttf +0 -0
  46. data/examples/fa-beer-inline.png +0 -0
  47. data/examples/fa-beer.png +0 -0
  48. data/examples/octicons.rb +0 -35
@@ -0,0 +1,34 @@
1
+ Font Awesome Free License
2
+ -------------------------
3
+
4
+ Font Awesome Free is free, open source, and GPL friendly. You can use it for
5
+ commercial projects, open source projects, or really almost whatever you want.
6
+ Full Font Awesome Free license: https://fontawesome.com/license.
7
+
8
+ # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
9
+ In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
10
+ packaged as SVG and JS file types.
11
+
12
+ # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
13
+ In the Font Awesome Free download, the SIL OLF license applies to all icons
14
+ packaged as web and desktop font files.
15
+
16
+ # Code: MIT License (https://opensource.org/licenses/MIT)
17
+ In the Font Awesome Free download, the MIT license applies to all non-font and
18
+ non-icon files.
19
+
20
+ # Attribution
21
+ Attribution is required by MIT, SIL OLF, and CC BY licenses. Downloaded Font
22
+ Awesome Free files already contain embedded comments with sufficient
23
+ attribution, so you shouldn't need to do anything additional when using these
24
+ files normally.
25
+
26
+ We've kept attribution comments terse, so we ask that you do not actively work
27
+ to remove them from files, especially code. They're a great way for folks to
28
+ learn about Font Awesome.
29
+
30
+ # Brand Icons
31
+ All brand icons are trademarks of their respective owners. The use of these
32
+ trademarks does not indicate endorsement of the trademark holder by Font
33
+ Awesome, nor vice versa. **Please do not use brand logos for any purpose except
34
+ to represent the company, product, or service to which they refer.**
@@ -0,0 +1,119 @@
1
+ ---
2
+ far:
3
+ __font_version__: 5.0.8
4
+ address-book: ""
5
+ address-card: ""
6
+ arrow-alt-circle-down: ""
7
+ arrow-alt-circle-left: ""
8
+ arrow-alt-circle-right: ""
9
+ arrow-alt-circle-up: ""
10
+ bell: ""
11
+ bell-slash: ""
12
+ bookmark: ""
13
+ building: ""
14
+ calendar: ""
15
+ calendar-alt: ""
16
+ calendar-check: ""
17
+ calendar-minus: ""
18
+ calendar-plus: ""
19
+ calendar-times: ""
20
+ caret-square-down: ""
21
+ caret-square-left: ""
22
+ caret-square-right: ""
23
+ caret-square-up: ""
24
+ chart-bar: ""
25
+ check-circle: ""
26
+ check-square: ""
27
+ circle: ""
28
+ clipboard: ""
29
+ clock: ""
30
+ clone: ""
31
+ closed-captioning: ""
32
+ comment: ""
33
+ comment-alt: ""
34
+ comments: ""
35
+ compass: ""
36
+ copy: ""
37
+ copyright: ""
38
+ credit-card: ""
39
+ dot-circle: ""
40
+ edit: ""
41
+ envelope: ""
42
+ envelope-open: ""
43
+ eye-slash: ""
44
+ file: ""
45
+ file-alt: ""
46
+ file-archive: ""
47
+ file-audio: ""
48
+ file-code: ""
49
+ file-excel: ""
50
+ file-image: ""
51
+ file-pdf: ""
52
+ file-powerpoint: ""
53
+ file-video: ""
54
+ file-word: ""
55
+ flag: ""
56
+ folder: ""
57
+ folder-open: ""
58
+ frown: ""
59
+ futbol: ""
60
+ gem: ""
61
+ hand-lizard: ""
62
+ hand-paper: ""
63
+ hand-peace: ""
64
+ hand-point-down: ""
65
+ hand-point-left: ""
66
+ hand-point-right: ""
67
+ hand-point-up: ""
68
+ hand-pointer: ""
69
+ hand-rock: ""
70
+ hand-scissors: ""
71
+ hand-spock: ""
72
+ handshake: ""
73
+ hdd: ""
74
+ heart: ""
75
+ hospital: ""
76
+ hourglass: ""
77
+ id-badge: ""
78
+ id-card: ""
79
+ image: ""
80
+ images: ""
81
+ keyboard: ""
82
+ lemon: ""
83
+ life-ring: ""
84
+ lightbulb: ""
85
+ list-alt: ""
86
+ map: ""
87
+ meh: ""
88
+ minus-square: ""
89
+ money-bill-alt: ""
90
+ moon: ""
91
+ newspaper: ""
92
+ object-group: ""
93
+ object-ungroup: ""
94
+ paper-plane: ""
95
+ pause-circle: ""
96
+ play-circle: ""
97
+ plus-square: ""
98
+ question-circle: ""
99
+ registered: ""
100
+ save: ""
101
+ share-square: ""
102
+ smile: ""
103
+ snowflake: ""
104
+ square: ""
105
+ star: ""
106
+ star-half: ""
107
+ sticky-note: ""
108
+ stop-circle: ""
109
+ sun: ""
110
+ thumbs-down: ""
111
+ thumbs-up: ""
112
+ times-circle: ""
113
+ trash-alt: ""
114
+ user: ""
115
+ user-circle: ""
116
+ window-close: ""
117
+ window-maximize: ""
118
+ window-minimize: ""
119
+ window-restore: ""
@@ -0,0 +1,34 @@
1
+ Font Awesome Free License
2
+ -------------------------
3
+
4
+ Font Awesome Free is free, open source, and GPL friendly. You can use it for
5
+ commercial projects, open source projects, or really almost whatever you want.
6
+ Full Font Awesome Free license: https://fontawesome.com/license.
7
+
8
+ # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
9
+ In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
10
+ packaged as SVG and JS file types.
11
+
12
+ # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
13
+ In the Font Awesome Free download, the SIL OLF license applies to all icons
14
+ packaged as web and desktop font files.
15
+
16
+ # Code: MIT License (https://opensource.org/licenses/MIT)
17
+ In the Font Awesome Free download, the MIT license applies to all non-font and
18
+ non-icon files.
19
+
20
+ # Attribution
21
+ Attribution is required by MIT, SIL OLF, and CC BY licenses. Downloaded Font
22
+ Awesome Free files already contain embedded comments with sufficient
23
+ attribution, so you shouldn't need to do anything additional when using these
24
+ files normally.
25
+
26
+ We've kept attribution comments terse, so we ask that you do not actively work
27
+ to remove them from files, especially code. They're a great way for folks to
28
+ learn about Font Awesome.
29
+
30
+ # Brand Icons
31
+ All brand icons are trademarks of their respective owners. The use of these
32
+ trademarks does not indicate endorsement of the trademark holder by Font
33
+ Awesome, nor vice versa. **Please do not use brand logos for any purpose except
34
+ to represent the company, product, or service to which they refer.**
@@ -0,0 +1,503 @@
1
+ ---
2
+ fas:
3
+ __font_version__: 5.0.8
4
+ address-book: ""
5
+ address-card: ""
6
+ adjust: ""
7
+ align-center: ""
8
+ align-justify: ""
9
+ align-left: ""
10
+ align-right: ""
11
+ ambulance: ""
12
+ american-sign-language-interpreting: ""
13
+ anchor: ""
14
+ angle-double-down: ""
15
+ angle-double-left: ""
16
+ angle-double-right: ""
17
+ angle-double-up: ""
18
+ angle-down: ""
19
+ angle-left: ""
20
+ angle-right: ""
21
+ angle-up: ""
22
+ archive: ""
23
+ arrow-alt-circle-down: ""
24
+ arrow-alt-circle-left: ""
25
+ arrow-alt-circle-right: ""
26
+ arrow-alt-circle-up: ""
27
+ arrow-circle-down: ""
28
+ arrow-circle-left: ""
29
+ arrow-circle-right: ""
30
+ arrow-circle-up: ""
31
+ arrow-down: ""
32
+ arrow-left: ""
33
+ arrow-right: ""
34
+ arrow-up: ""
35
+ arrows-alt: ""
36
+ arrows-alt-h: ""
37
+ arrows-alt-v: ""
38
+ assistive-listening-systems: ""
39
+ asterisk: ""
40
+ at: ""
41
+ audio-description: ""
42
+ backward: ""
43
+ balance-scale: ""
44
+ ban: ""
45
+ band-aid: ""
46
+ barcode: ""
47
+ bars: ""
48
+ baseball-ball: ""
49
+ basketball-ball: ""
50
+ bath: ""
51
+ battery-empty: ""
52
+ battery-full: ""
53
+ battery-half: ""
54
+ battery-quarter: ""
55
+ battery-three-quarters: ""
56
+ bed: ""
57
+ beer: ""
58
+ bell: ""
59
+ bell-slash: ""
60
+ bicycle: ""
61
+ binoculars: ""
62
+ birthday-cake: ""
63
+ blind: ""
64
+ bold: ""
65
+ bolt: ""
66
+ bomb: ""
67
+ book: ""
68
+ bookmark: ""
69
+ bowling-ball: ""
70
+ box: ""
71
+ boxes: ""
72
+ braille: ""
73
+ briefcase: ""
74
+ bug: ""
75
+ building: ""
76
+ bullhorn: ""
77
+ bullseye: ""
78
+ bus: ""
79
+ calculator: ""
80
+ calendar: ""
81
+ calendar-alt: ""
82
+ calendar-check: ""
83
+ calendar-minus: ""
84
+ calendar-plus: ""
85
+ calendar-times: ""
86
+ camera: ""
87
+ camera-retro: ""
88
+ car: ""
89
+ caret-down: ""
90
+ caret-left: ""
91
+ caret-right: ""
92
+ caret-square-down: ""
93
+ caret-square-left: ""
94
+ caret-square-right: ""
95
+ caret-square-up: ""
96
+ caret-up: ""
97
+ cart-arrow-down: ""
98
+ cart-plus: ""
99
+ certificate: ""
100
+ chart-area: ""
101
+ chart-bar: ""
102
+ chart-line: ""
103
+ chart-pie: ""
104
+ check: ""
105
+ check-circle: ""
106
+ check-square: ""
107
+ chess: ""
108
+ chess-bishop: ""
109
+ chess-board: ""
110
+ chess-king: ""
111
+ chess-knight: ""
112
+ chess-pawn: ""
113
+ chess-queen: ""
114
+ chess-rook: ""
115
+ chevron-circle-down: ""
116
+ chevron-circle-left: ""
117
+ chevron-circle-right: ""
118
+ chevron-circle-up: ""
119
+ chevron-down: ""
120
+ chevron-left: ""
121
+ chevron-right: ""
122
+ chevron-up: ""
123
+ child: ""
124
+ circle: ""
125
+ circle-notch: ""
126
+ clipboard: ""
127
+ clipboard-check: ""
128
+ clipboard-list: ""
129
+ clock: ""
130
+ clone: ""
131
+ closed-captioning: ""
132
+ cloud: ""
133
+ cloud-download-alt: ""
134
+ cloud-upload-alt: ""
135
+ code: ""
136
+ code-branch: ""
137
+ coffee: ""
138
+ cog: ""
139
+ cogs: ""
140
+ columns: ""
141
+ comment: ""
142
+ comment-alt: ""
143
+ comments: ""
144
+ compass: ""
145
+ compress: ""
146
+ copy: ""
147
+ copyright: ""
148
+ credit-card: ""
149
+ crop: ""
150
+ crosshairs: ""
151
+ cube: ""
152
+ cubes: ""
153
+ cut: ""
154
+ database: ""
155
+ deaf: ""
156
+ desktop: ""
157
+ dna: ""
158
+ dollar-sign: ""
159
+ dolly: ""
160
+ dolly-flatbed: ""
161
+ dot-circle: ""
162
+ download: ""
163
+ edit: ""
164
+ eject: ""
165
+ ellipsis-h: ""
166
+ ellipsis-v: ""
167
+ envelope: ""
168
+ envelope-open: ""
169
+ envelope-square: ""
170
+ eraser: ""
171
+ euro-sign: ""
172
+ exchange-alt: ""
173
+ exclamation: ""
174
+ exclamation-circle: ""
175
+ exclamation-triangle: ""
176
+ expand: ""
177
+ expand-arrows-alt: ""
178
+ external-link-alt: ""
179
+ external-link-square-alt: ""
180
+ eye: ""
181
+ eye-dropper: ""
182
+ eye-slash: ""
183
+ fast-backward: ""
184
+ fast-forward: ""
185
+ fax: ""
186
+ female: ""
187
+ fighter-jet: ""
188
+ file: ""
189
+ file-alt: ""
190
+ file-archive: ""
191
+ file-audio: ""
192
+ file-code: ""
193
+ file-excel: ""
194
+ file-image: ""
195
+ file-pdf: ""
196
+ file-powerpoint: ""
197
+ file-video: ""
198
+ file-word: ""
199
+ film: ""
200
+ filter: ""
201
+ fire: ""
202
+ fire-extinguisher: ""
203
+ first-aid: ""
204
+ flag: ""
205
+ flag-checkered: ""
206
+ flask: ""
207
+ folder: ""
208
+ folder-open: ""
209
+ font: ""
210
+ football-ball: ""
211
+ forward: ""
212
+ frown: ""
213
+ futbol: ""
214
+ gamepad: ""
215
+ gavel: ""
216
+ gem: ""
217
+ genderless: ""
218
+ gift: ""
219
+ glass-martini: ""
220
+ globe: ""
221
+ golf-ball: ""
222
+ graduation-cap: ""
223
+ h-square: ""
224
+ hand-lizard: ""
225
+ hand-paper: ""
226
+ hand-peace: ""
227
+ hand-point-down: ""
228
+ hand-point-left: ""
229
+ hand-point-right: ""
230
+ hand-point-up: ""
231
+ hand-pointer: ""
232
+ hand-rock: ""
233
+ hand-scissors: ""
234
+ hand-spock: ""
235
+ handshake: ""
236
+ hashtag: ""
237
+ hdd: ""
238
+ heading: ""
239
+ headphones: ""
240
+ heart: ""
241
+ heartbeat: ""
242
+ history: ""
243
+ hockey-puck: ""
244
+ home: ""
245
+ hospital: ""
246
+ hospital-symbol: ""
247
+ hourglass: ""
248
+ hourglass-end: ""
249
+ hourglass-half: ""
250
+ hourglass-start: ""
251
+ i-cursor: ""
252
+ id-badge: ""
253
+ id-card: ""
254
+ image: ""
255
+ images: ""
256
+ inbox: ""
257
+ indent: ""
258
+ industry: ""
259
+ info: ""
260
+ info-circle: ""
261
+ italic: ""
262
+ key: ""
263
+ keyboard: ""
264
+ language: ""
265
+ laptop: ""
266
+ leaf: ""
267
+ lemon: ""
268
+ level-down-alt: ""
269
+ level-up-alt: ""
270
+ life-ring: ""
271
+ lightbulb: ""
272
+ link: ""
273
+ lira-sign: ""
274
+ list: ""
275
+ list-alt: ""
276
+ list-ol: ""
277
+ list-ul: ""
278
+ location-arrow: ""
279
+ lock: ""
280
+ lock-open: ""
281
+ long-arrow-alt-down: ""
282
+ long-arrow-alt-left: ""
283
+ long-arrow-alt-right: ""
284
+ long-arrow-alt-up: ""
285
+ low-vision: ""
286
+ magic: ""
287
+ magnet: ""
288
+ male: ""
289
+ map: ""
290
+ map-marker: ""
291
+ map-marker-alt: ""
292
+ map-pin: ""
293
+ map-signs: ""
294
+ mars: ""
295
+ mars-double: ""
296
+ mars-stroke: ""
297
+ mars-stroke-h: ""
298
+ mars-stroke-v: ""
299
+ medkit: ""
300
+ meh: ""
301
+ mercury: ""
302
+ microchip: ""
303
+ microphone: ""
304
+ microphone-slash: ""
305
+ minus: ""
306
+ minus-circle: ""
307
+ minus-square: ""
308
+ mobile: ""
309
+ mobile-alt: ""
310
+ money-bill-alt: ""
311
+ moon: ""
312
+ motorcycle: ""
313
+ mouse-pointer: ""
314
+ music: ""
315
+ neuter: ""
316
+ newspaper: ""
317
+ object-group: ""
318
+ object-ungroup: ""
319
+ outdent: ""
320
+ paint-brush: ""
321
+ pallet: ""
322
+ paper-plane: ""
323
+ paperclip: ""
324
+ paragraph: ""
325
+ paste: ""
326
+ pause: ""
327
+ pause-circle: ""
328
+ paw: ""
329
+ pen-square: ""
330
+ pencil-alt: ""
331
+ percent: ""
332
+ phone: ""
333
+ phone-square: ""
334
+ phone-volume: ""
335
+ pills: ""
336
+ plane: ""
337
+ play: ""
338
+ play-circle: ""
339
+ plug: ""
340
+ plus: ""
341
+ plus-circle: ""
342
+ plus-square: ""
343
+ podcast: ""
344
+ pound-sign: ""
345
+ power-off: ""
346
+ print: ""
347
+ puzzle-piece: ""
348
+ qrcode: ""
349
+ question: ""
350
+ question-circle: ""
351
+ quidditch: ""
352
+ quote-left: ""
353
+ quote-right: ""
354
+ random: ""
355
+ recycle: ""
356
+ redo: ""
357
+ redo-alt: ""
358
+ registered: ""
359
+ reply: ""
360
+ reply-all: ""
361
+ retweet: ""
362
+ road: ""
363
+ rocket: ""
364
+ rss: ""
365
+ rss-square: ""
366
+ ruble-sign: ""
367
+ rupee-sign: ""
368
+ save: ""
369
+ search: ""
370
+ search-minus: ""
371
+ search-plus: ""
372
+ server: ""
373
+ share: ""
374
+ share-alt: ""
375
+ share-alt-square: ""
376
+ share-square: ""
377
+ shekel-sign: ""
378
+ shield-alt: ""
379
+ ship: ""
380
+ shipping-fast: ""
381
+ shopping-bag: ""
382
+ shopping-basket: ""
383
+ shopping-cart: ""
384
+ shower: ""
385
+ sign-in-alt: ""
386
+ sign-language: ""
387
+ sign-out-alt: ""
388
+ signal: ""
389
+ sitemap: ""
390
+ sliders-h: ""
391
+ smile: ""
392
+ snowflake: ""
393
+ sort: ""
394
+ sort-alpha-down: ""
395
+ sort-alpha-up: ""
396
+ sort-amount-down: ""
397
+ sort-amount-up: ""
398
+ sort-down: ""
399
+ sort-numeric-down: ""
400
+ sort-numeric-up: ""
401
+ sort-up: ""
402
+ space-shuttle: ""
403
+ spinner: ""
404
+ square: ""
405
+ square-full: ""
406
+ star: ""
407
+ star-half: ""
408
+ step-backward: ""
409
+ step-forward: ""
410
+ stethoscope: ""
411
+ sticky-note: ""
412
+ stop: ""
413
+ stop-circle: ""
414
+ stopwatch: ""
415
+ street-view: ""
416
+ strikethrough: ""
417
+ subscript: ""
418
+ subway: ""
419
+ suitcase: ""
420
+ sun: ""
421
+ superscript: ""
422
+ sync: ""
423
+ sync-alt: ""
424
+ syringe: ""
425
+ table: ""
426
+ table-tennis: ""
427
+ tablet: ""
428
+ tablet-alt: ""
429
+ tachometer-alt: ""
430
+ tag: ""
431
+ tags: ""
432
+ tasks: ""
433
+ taxi: ""
434
+ terminal: ""
435
+ text-height: ""
436
+ text-width: ""
437
+ th: ""
438
+ th-large: ""
439
+ th-list: ""
440
+ thermometer: ""
441
+ thermometer-empty: ""
442
+ thermometer-full: ""
443
+ thermometer-half: ""
444
+ thermometer-quarter: ""
445
+ thermometer-three-quarters: ""
446
+ thumbs-down: ""
447
+ thumbs-up: ""
448
+ thumbtack: ""
449
+ ticket-alt: ""
450
+ times: ""
451
+ times-circle: ""
452
+ tint: ""
453
+ toggle-off: ""
454
+ toggle-on: ""
455
+ trademark: ""
456
+ train: ""
457
+ transgender: ""
458
+ transgender-alt: ""
459
+ trash: ""
460
+ trash-alt: ""
461
+ tree: ""
462
+ trophy: ""
463
+ truck: ""
464
+ tty: ""
465
+ tv: ""
466
+ umbrella: ""
467
+ underline: ""
468
+ undo: ""
469
+ undo-alt: ""
470
+ universal-access: ""
471
+ university: ""
472
+ unlink: ""
473
+ unlock: ""
474
+ unlock-alt: ""
475
+ upload: ""
476
+ user: ""
477
+ user-circle: ""
478
+ user-md: ""
479
+ user-plus: ""
480
+ user-secret: ""
481
+ user-times: ""
482
+ users: ""
483
+ utensil-spoon: ""
484
+ utensils: ""
485
+ venus: ""
486
+ venus-double: ""
487
+ venus-mars: ""
488
+ video: ""
489
+ volleyball-ball: ""
490
+ volume-down: ""
491
+ volume-off: ""
492
+ volume-up: ""
493
+ warehouse: ""
494
+ weight: ""
495
+ wheelchair: ""
496
+ wifi: ""
497
+ window-close: ""
498
+ window-maximize: ""
499
+ window-minimize: ""
500
+ window-restore: ""
501
+ won-sign: ""
502
+ wrench: ""
503
+ yen-sign: ""