prawn-icon 1.4.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +10 -10
- data/data/fonts/fab/LICENSE +34 -0
- data/data/fonts/fab/fa-brands.ttf +0 -0
- data/data/fonts/fab/fab.yml +333 -0
- data/data/fonts/far/LICENSE +34 -0
- data/data/fonts/far/fa-regular.ttf +0 -0
- data/data/fonts/far/far.yml +119 -0
- data/data/fonts/fas/LICENSE +34 -0
- data/data/fonts/fas/fa-solid.ttf +0 -0
- data/data/fonts/fas/fas.yml +503 -0
- data/examples/fas-beer-inline.png +0 -0
- data/examples/fas-beer.png +0 -0
- data/examples/fontawesome.rb +28 -20
- data/lib/prawn/icon.rb +1 -0
- data/lib/prawn/icon/font_data.rb +1 -1
- data/lib/prawn/icon/interface.rb +5 -6
- data/lib/prawn/icon/version.rb +1 -1
- data/prawn-icon.gemspec +1 -1
- data/spec/integration/icon_spec.rb +44 -35
- data/spec/unit/errors/icon_not_found_spec.rb +1 -1
- data/spec/unit/font_data_spec.rb +14 -15
- data/spec/unit/icon_spec.rb +14 -14
- data/spec/unit/parser_spec.rb +26 -26
- metadata +14 -12
- data/data/fonts/fa/LICENSE +0 -4
- data/data/fonts/fa/fa.yml +0 -789
- data/data/fonts/fa/fontawesome.ttf +0 -0
- data/data/fonts/octicon/LICENSE +0 -9
- data/data/fonts/octicon/octicon.yml +0 -174
- data/data/fonts/octicon/octicons.ttf +0 -0
- data/examples/fa-beer-inline.png +0 -0
- data/examples/fa-beer.png +0 -0
- data/examples/octicons.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9efb0b74b59e669ba8755dc2768d156b798eafb7
|
4
|
+
data.tar.gz: b4ac081cd8e32226989e4a1372ecbc02bdcd025e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1af37c3f257d7f1904365049e43c98079fbcf8731a04d20b8aceebfff92d2e49d9a720284a1c468a79b58d248fae9571f5fdd2b5627e68e5f924ad3e63e0ff3
|
7
|
+
data.tar.gz: 62c35e08a09d709dfc60996404224083c2206ac208039c6943a1379c5b3affa98d39f52f79b15a8c68b575da3bb85b12a79a3f2fb552a6984296a1c2b026aaae
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 2.0.0 - March 7, 2018
|
2
|
+
|
3
|
+
* [**breaking change**] Update to FontAwesome 5.0.8. FontAwesome 5 now provides 3 different font families: `brands`, `regular` and `solid`. The specifiers for these font icons are now: `fab`, `far` and `fas`.
|
4
|
+
* [**breaking change**] Remove GitHub Octicons because Octicons are now only [delivered via SVG](https://github.com/blog/2112-delivering-octicons-with-svg).
|
5
|
+
* [**breaking change**] Make the font specifier a required attribute for `Prawn::Icon::FontData#new`. Previously it was assumed to be `fa`.
|
6
|
+
* Write a new tool `tool/fontawesome/converter.rb` that accepts the FontAwesome metadata YAML file ([link](https://github.com/FortAwesome/Font-Awesome/blob/31281606f5205b0191c17c3b4d2d56e1ddbb2dc6/advanced-options/metadata/icons.yml)), and generates the correct legend files for `brands`, `regular` and `solid` styles.
|
7
|
+
* Require 'prawn/icon/version' with by default.
|
8
|
+
|
1
9
|
# 1.4.0 - Sept 11, 2017
|
2
10
|
|
3
11
|
- Update dependency gems to latest version.
|
data/README.md
CHANGED
@@ -10,7 +10,6 @@ The following icon fonts ship with Prawn::Icon:
|
|
10
10
|
|
11
11
|
* FontAwesome (http://fontawesome.io/icons/)
|
12
12
|
* Foundation Icons (http://zurb.com/playground/foundation-icon-fonts-3)
|
13
|
-
* GitHub Octicons (https://octicons.github.com)
|
14
13
|
* PaymentFont (http://paymentfont.io)
|
15
14
|
|
16
15
|
Prawn::Icon was originally written by Jesse Doyle.
|
@@ -31,13 +30,13 @@ Prawn::Icon was designed to have an API familiar to Prawn. A single icon may be
|
|
31
30
|
require 'prawn/icon'
|
32
31
|
|
33
32
|
Prawn::Document.generate('icons.pdf') do |pdf|
|
34
|
-
pdf.icon '
|
33
|
+
pdf.icon 'fas-beer', size: 60
|
35
34
|
end
|
36
35
|
```
|
37
36
|
|
38
37
|
produces:
|
39
38
|
|
40
|
-
![FontAwesome Beer](https://raw.github.com/jessedoyle/prawn-icon/master/examples/
|
39
|
+
![FontAwesome Beer](https://raw.github.com/jessedoyle/prawn-icon/master/examples/fas-beer.png)
|
41
40
|
|
42
41
|
## Inline Icons
|
43
42
|
|
@@ -47,13 +46,13 @@ You can also provide the `inline_format: true` option to Prawn::Icon:
|
|
47
46
|
require 'prawn/icon'
|
48
47
|
|
49
48
|
Prawn::Document.generate('inline_icons.pdf') do |pdf|
|
50
|
-
pdf.icon 'Enjoy: <icon size="20" color="AAAAAA">
|
49
|
+
pdf.icon 'Enjoy: <icon size="20" color="AAAAAA">fas-beer</icon>', inline_format: true
|
51
50
|
end
|
52
51
|
```
|
53
52
|
|
54
53
|
produces:
|
55
54
|
|
56
|
-
![FontAwesome Beer Inline](https://raw.github.com/jessedoyle/prawn-icon/master/examples/
|
55
|
+
![FontAwesome Beer Inline](https://raw.github.com/jessedoyle/prawn-icon/master/examples/fas-beer-inline.png)
|
57
56
|
|
58
57
|
When using `inline_format: true`, you may supply `<icon>` tags with `color` and `size` attributes.
|
59
58
|
|
@@ -69,7 +68,7 @@ Prawn::Document.generate('table_icons.pdf') do |pdf|
|
|
69
68
|
|
70
69
|
data = [
|
71
70
|
# Explicit brackets must be used here
|
72
|
-
[pdf.table_icon('
|
71
|
+
[pdf.table_icon('fas-birthday-cake'), 'Cake'],
|
73
72
|
['is', 'Great!']
|
74
73
|
]
|
75
74
|
|
@@ -85,10 +84,11 @@ Prawn::Icon uses the prefix of an icon key to determine which font family is use
|
|
85
84
|
|
86
85
|
Currently supported prefixes include:
|
87
86
|
|
88
|
-
* `
|
89
|
-
* `
|
90
|
-
* `
|
91
|
-
* `
|
87
|
+
* `fab` - [FontAwesome Brands](https://fontawesome.com/icons?d=gallery&s=brands&m=free) (eg. `fab-amazon`).
|
88
|
+
* `far` - [FontAwesome Regular](https://fontawesome.com/icons?d=gallery&s=regular&m=free) (eg. `far-address-book`).
|
89
|
+
* `fas` - [FontAwesome Solid](https://fontawesome.com/icons?d=gallery&s=solid&m=free) (eg. `fas-location-arrow`).
|
90
|
+
* `fi` - [Foundation Icons](https://zurb.com/playground/foundation-icon-fonts-3) (eg. `fi-compass`).
|
91
|
+
* `pf` - [PaymentFont](https://paymentfont.com/#icons) (eg. `pf-cash`).
|
92
92
|
|
93
93
|
## How It Works
|
94
94
|
|
@@ -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.**
|
Binary file
|
@@ -0,0 +1,333 @@
|
|
1
|
+
---
|
2
|
+
fab:
|
3
|
+
__font_version__: 5.0.8
|
4
|
+
500px: ""
|
5
|
+
accessible-icon: ""
|
6
|
+
accusoft: ""
|
7
|
+
adn: ""
|
8
|
+
adversal: ""
|
9
|
+
affiliatetheme: ""
|
10
|
+
algolia: ""
|
11
|
+
amazon: ""
|
12
|
+
amazon-pay: ""
|
13
|
+
amilia: ""
|
14
|
+
android: ""
|
15
|
+
angellist: ""
|
16
|
+
angrycreative: ""
|
17
|
+
angular: ""
|
18
|
+
app-store: ""
|
19
|
+
app-store-ios: ""
|
20
|
+
apper: ""
|
21
|
+
apple: ""
|
22
|
+
apple-pay: ""
|
23
|
+
asymmetrik: ""
|
24
|
+
audible: ""
|
25
|
+
autoprefixer: ""
|
26
|
+
avianex: ""
|
27
|
+
aviato: ""
|
28
|
+
aws: ""
|
29
|
+
bandcamp: ""
|
30
|
+
behance: ""
|
31
|
+
behance-square: ""
|
32
|
+
bimobject: ""
|
33
|
+
bitbucket: ""
|
34
|
+
bitcoin: ""
|
35
|
+
bity: ""
|
36
|
+
black-tie: ""
|
37
|
+
blackberry: ""
|
38
|
+
blogger: ""
|
39
|
+
blogger-b: ""
|
40
|
+
bluetooth: ""
|
41
|
+
bluetooth-b: ""
|
42
|
+
btc: ""
|
43
|
+
buromobelexperte: ""
|
44
|
+
buysellads: ""
|
45
|
+
cc-amazon-pay: ""
|
46
|
+
cc-amex: ""
|
47
|
+
cc-apple-pay: ""
|
48
|
+
cc-diners-club: ""
|
49
|
+
cc-discover: ""
|
50
|
+
cc-jcb: ""
|
51
|
+
cc-mastercard: ""
|
52
|
+
cc-paypal: ""
|
53
|
+
cc-stripe: ""
|
54
|
+
cc-visa: ""
|
55
|
+
centercode: ""
|
56
|
+
chrome: ""
|
57
|
+
cloudscale: ""
|
58
|
+
cloudsmith: ""
|
59
|
+
cloudversify: ""
|
60
|
+
codepen: ""
|
61
|
+
codiepie: ""
|
62
|
+
connectdevelop: ""
|
63
|
+
contao: ""
|
64
|
+
cpanel: ""
|
65
|
+
creative-commons: ""
|
66
|
+
css3: ""
|
67
|
+
css3-alt: ""
|
68
|
+
cuttlefish: ""
|
69
|
+
d-and-d: ""
|
70
|
+
dashcube: ""
|
71
|
+
delicious: ""
|
72
|
+
deploydog: ""
|
73
|
+
deskpro: ""
|
74
|
+
deviantart: ""
|
75
|
+
digg: ""
|
76
|
+
digital-ocean: ""
|
77
|
+
discord: ""
|
78
|
+
discourse: ""
|
79
|
+
dochub: ""
|
80
|
+
docker: ""
|
81
|
+
draft2digital: ""
|
82
|
+
dribbble: ""
|
83
|
+
dribbble-square: ""
|
84
|
+
dropbox: ""
|
85
|
+
drupal: ""
|
86
|
+
dyalog: ""
|
87
|
+
earlybirds: ""
|
88
|
+
edge: ""
|
89
|
+
elementor: ""
|
90
|
+
ember: ""
|
91
|
+
empire: ""
|
92
|
+
envira: ""
|
93
|
+
erlang: ""
|
94
|
+
ethereum: ""
|
95
|
+
etsy: ""
|
96
|
+
expeditedssl: ""
|
97
|
+
facebook: ""
|
98
|
+
facebook-f: ""
|
99
|
+
facebook-messenger: ""
|
100
|
+
facebook-square: ""
|
101
|
+
firefox: ""
|
102
|
+
first-order: ""
|
103
|
+
firstdraft: ""
|
104
|
+
flickr: ""
|
105
|
+
flipboard: ""
|
106
|
+
fly: ""
|
107
|
+
font-awesome: ""
|
108
|
+
font-awesome-alt: ""
|
109
|
+
font-awesome-flag: ""
|
110
|
+
fonticons: ""
|
111
|
+
fonticons-fi: ""
|
112
|
+
fort-awesome: ""
|
113
|
+
fort-awesome-alt: ""
|
114
|
+
forumbee: ""
|
115
|
+
foursquare: ""
|
116
|
+
free-code-camp: ""
|
117
|
+
freebsd: ""
|
118
|
+
get-pocket: ""
|
119
|
+
gg: ""
|
120
|
+
gg-circle: ""
|
121
|
+
git: ""
|
122
|
+
git-square: ""
|
123
|
+
github: ""
|
124
|
+
github-alt: ""
|
125
|
+
github-square: ""
|
126
|
+
gitkraken: ""
|
127
|
+
gitlab: ""
|
128
|
+
gitter: ""
|
129
|
+
glide: ""
|
130
|
+
glide-g: ""
|
131
|
+
gofore: ""
|
132
|
+
goodreads: ""
|
133
|
+
goodreads-g: ""
|
134
|
+
google: ""
|
135
|
+
google-drive: ""
|
136
|
+
google-play: ""
|
137
|
+
google-plus: ""
|
138
|
+
google-plus-g: ""
|
139
|
+
google-plus-square: ""
|
140
|
+
google-wallet: ""
|
141
|
+
gratipay: ""
|
142
|
+
grav: ""
|
143
|
+
gripfire: ""
|
144
|
+
grunt: ""
|
145
|
+
gulp: ""
|
146
|
+
hacker-news: ""
|
147
|
+
hacker-news-square: ""
|
148
|
+
hips: ""
|
149
|
+
hire-a-helper: ""
|
150
|
+
hooli: ""
|
151
|
+
hotjar: ""
|
152
|
+
houzz: ""
|
153
|
+
html5: ""
|
154
|
+
hubspot: ""
|
155
|
+
imdb: ""
|
156
|
+
instagram: ""
|
157
|
+
internet-explorer: ""
|
158
|
+
ioxhost: ""
|
159
|
+
itunes: ""
|
160
|
+
itunes-note: ""
|
161
|
+
jenkins: ""
|
162
|
+
joget: ""
|
163
|
+
joomla: ""
|
164
|
+
js: ""
|
165
|
+
js-square: ""
|
166
|
+
jsfiddle: ""
|
167
|
+
keycdn: ""
|
168
|
+
kickstarter: ""
|
169
|
+
kickstarter-k: ""
|
170
|
+
korvue: ""
|
171
|
+
laravel: ""
|
172
|
+
lastfm: ""
|
173
|
+
lastfm-square: ""
|
174
|
+
leanpub: ""
|
175
|
+
less: ""
|
176
|
+
line: ""
|
177
|
+
linkedin: ""
|
178
|
+
linkedin-in: ""
|
179
|
+
linode: ""
|
180
|
+
linux: ""
|
181
|
+
lyft: ""
|
182
|
+
magento: ""
|
183
|
+
maxcdn: ""
|
184
|
+
medapps: ""
|
185
|
+
medium: ""
|
186
|
+
medium-m: ""
|
187
|
+
medrt: ""
|
188
|
+
meetup: ""
|
189
|
+
microsoft: ""
|
190
|
+
mix: ""
|
191
|
+
mixcloud: ""
|
192
|
+
mizuni: ""
|
193
|
+
modx: ""
|
194
|
+
monero: ""
|
195
|
+
napster: ""
|
196
|
+
nintendo-switch: ""
|
197
|
+
node: ""
|
198
|
+
node-js: ""
|
199
|
+
npm: ""
|
200
|
+
ns8: ""
|
201
|
+
nutritionix: ""
|
202
|
+
odnoklassniki: ""
|
203
|
+
odnoklassniki-square: ""
|
204
|
+
opencart: ""
|
205
|
+
openid: ""
|
206
|
+
opera: ""
|
207
|
+
optin-monster: ""
|
208
|
+
osi: ""
|
209
|
+
page4: ""
|
210
|
+
pagelines: ""
|
211
|
+
palfed: ""
|
212
|
+
patreon: ""
|
213
|
+
paypal: ""
|
214
|
+
periscope: ""
|
215
|
+
phabricator: ""
|
216
|
+
phoenix-framework: ""
|
217
|
+
php: ""
|
218
|
+
pied-piper: ""
|
219
|
+
pied-piper-alt: ""
|
220
|
+
pied-piper-pp: ""
|
221
|
+
pinterest: ""
|
222
|
+
pinterest-p: ""
|
223
|
+
pinterest-square: ""
|
224
|
+
playstation: ""
|
225
|
+
product-hunt: ""
|
226
|
+
pushed: ""
|
227
|
+
python: ""
|
228
|
+
qq: ""
|
229
|
+
quinscape: ""
|
230
|
+
quora: ""
|
231
|
+
ravelry: ""
|
232
|
+
react: ""
|
233
|
+
rebel: ""
|
234
|
+
red-river: ""
|
235
|
+
reddit: ""
|
236
|
+
reddit-alien: ""
|
237
|
+
reddit-square: ""
|
238
|
+
rendact: ""
|
239
|
+
renren: ""
|
240
|
+
replyd: ""
|
241
|
+
resolving: ""
|
242
|
+
rocketchat: ""
|
243
|
+
rockrms: ""
|
244
|
+
safari: ""
|
245
|
+
sass: ""
|
246
|
+
schlix: ""
|
247
|
+
scribd: ""
|
248
|
+
searchengin: ""
|
249
|
+
sellcast: ""
|
250
|
+
sellsy: ""
|
251
|
+
servicestack: ""
|
252
|
+
shirtsinbulk: ""
|
253
|
+
simplybuilt: ""
|
254
|
+
sistrix: ""
|
255
|
+
skyatlas: ""
|
256
|
+
skype: ""
|
257
|
+
slack: ""
|
258
|
+
slack-hash: ""
|
259
|
+
slideshare: ""
|
260
|
+
snapchat: ""
|
261
|
+
snapchat-ghost: ""
|
262
|
+
snapchat-square: ""
|
263
|
+
soundcloud: ""
|
264
|
+
speakap: ""
|
265
|
+
spotify: ""
|
266
|
+
stack-exchange: ""
|
267
|
+
stack-overflow: ""
|
268
|
+
staylinked: ""
|
269
|
+
steam: ""
|
270
|
+
steam-square: ""
|
271
|
+
steam-symbol: ""
|
272
|
+
sticker-mule: ""
|
273
|
+
strava: ""
|
274
|
+
stripe: ""
|
275
|
+
stripe-s: ""
|
276
|
+
studiovinari: ""
|
277
|
+
stumbleupon: ""
|
278
|
+
stumbleupon-circle: ""
|
279
|
+
superpowers: ""
|
280
|
+
supple: ""
|
281
|
+
telegram: ""
|
282
|
+
telegram-plane: ""
|
283
|
+
tencent-weibo: ""
|
284
|
+
themeisle: ""
|
285
|
+
trello: ""
|
286
|
+
tripadvisor: ""
|
287
|
+
tumblr: ""
|
288
|
+
tumblr-square: ""
|
289
|
+
twitch: ""
|
290
|
+
twitter: ""
|
291
|
+
twitter-square: ""
|
292
|
+
typo3: ""
|
293
|
+
uber: ""
|
294
|
+
uikit: ""
|
295
|
+
uniregistry: ""
|
296
|
+
untappd: ""
|
297
|
+
usb: ""
|
298
|
+
ussunnah: ""
|
299
|
+
vaadin: ""
|
300
|
+
viacoin: ""
|
301
|
+
viadeo: ""
|
302
|
+
viadeo-square: ""
|
303
|
+
viber: ""
|
304
|
+
vimeo: ""
|
305
|
+
vimeo-square: ""
|
306
|
+
vimeo-v: ""
|
307
|
+
vine: ""
|
308
|
+
vk: ""
|
309
|
+
vnv: ""
|
310
|
+
vuejs: ""
|
311
|
+
weibo: ""
|
312
|
+
weixin: ""
|
313
|
+
whatsapp: ""
|
314
|
+
whatsapp-square: ""
|
315
|
+
whmcs: ""
|
316
|
+
wikipedia-w: ""
|
317
|
+
windows: ""
|
318
|
+
wordpress: ""
|
319
|
+
wordpress-simple: ""
|
320
|
+
wpbeginner: ""
|
321
|
+
wpexplorer: ""
|
322
|
+
wpforms: ""
|
323
|
+
xbox: ""
|
324
|
+
xing: ""
|
325
|
+
xing-square: ""
|
326
|
+
y-combinator: ""
|
327
|
+
yahoo: ""
|
328
|
+
yandex: ""
|
329
|
+
yandex-international: ""
|
330
|
+
yelp: ""
|
331
|
+
yoast: ""
|
332
|
+
youtube: ""
|
333
|
+
youtube-square: ""
|