prawn-icon 1.0.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 +54 -1
- data/GPLv2 +21 -22
- 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/data/fonts/pf/paymentfont-webfont.ttf +0 -0
- data/data/fonts/pf/pf.yml +118 -97
- data/examples/fas-beer-inline.png +0 -0
- data/examples/fas-beer.png +0 -0
- data/examples/fontawesome.rb +28 -20
- data/examples/foundation_icons.rb +1 -1
- data/examples/paymentfont.rb +1 -1
- data/lib/prawn/icon.rb +3 -200
- data/lib/prawn/icon/base.rb +19 -0
- data/lib/prawn/icon/errors.rb +21 -0
- data/lib/prawn/icon/font_data.rb +11 -13
- data/lib/prawn/icon/interface.rb +208 -0
- data/lib/prawn/icon/parser.rb +45 -53
- data/lib/prawn/icon/version.rb +1 -1
- data/prawn-icon.gemspec +8 -9
- data/spec/integration/icon_spec.rb +80 -60
- data/spec/spec_helper.rb +4 -0
- data/spec/support/parser_helper.rb +1 -1
- data/spec/support/pdf_helper.rb +1 -1
- data/spec/unit/base_spec.rb +15 -0
- data/spec/unit/errors/icon_key_empty_spec.rb +19 -0
- data/spec/unit/errors/icon_not_found_spec.rb +19 -0
- data/spec/unit/font_data_spec.rb +54 -73
- data/spec/unit/icon_spec.rb +20 -27
- data/spec/unit/parser_spec.rb +66 -63
- metadata +35 -41
- data/data/fonts/fa/LICENSE +0 -4
- data/data/fonts/fa/fa.yml +0 -676
- data/data/fonts/fa/fontawesome.ttf +0 -0
- data/data/fonts/octicon/LICENSE +0 -9
- data/data/fonts/octicon/octicon.yml +0 -192
- 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
Binary file
|
data/data/fonts/octicon/LICENSE
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
(c) 2012-2014 GitHub
|
2
|
-
|
3
|
-
When using the GitHub logos, be sure to follow the GitHub logo guidelines (https://github.com/logos)
|
4
|
-
|
5
|
-
Font License: SIL OFL 1.1 (http://scripts.sil.org/OFL)
|
6
|
-
Applies to all font files
|
7
|
-
|
8
|
-
Code License: MIT (http://choosealicense.com/licenses/mit/)
|
9
|
-
Applies to all other files
|
@@ -1,192 +0,0 @@
|
|
1
|
-
octicon:
|
2
|
-
__font_version__: '3.1.0'
|
3
|
-
alert: "\uf02d"
|
4
|
-
arrow-down: "\uf03f"
|
5
|
-
arrow-left: "\uf040"
|
6
|
-
arrow-right: "\uf03e"
|
7
|
-
arrow-small-down: "\uf0a0"
|
8
|
-
arrow-small-left: "\uf0a1"
|
9
|
-
arrow-small-right: "\uf071"
|
10
|
-
arrow-small-up: "\uf09f"
|
11
|
-
arrow-up: "\uf03d"
|
12
|
-
beaker: "\uf0dd"
|
13
|
-
bell: "\uf0de"
|
14
|
-
book: "\uf007"
|
15
|
-
bookmark: "\uf07b"
|
16
|
-
briefcase: "\uf0d3"
|
17
|
-
broadcast: "\uf048"
|
18
|
-
browser: "\uf0c5"
|
19
|
-
bug: "\uf091"
|
20
|
-
calendar: "\uf068"
|
21
|
-
check: "\uf03a"
|
22
|
-
checklist: "\uf076"
|
23
|
-
chevron-down: "\uf0a3"
|
24
|
-
chevron-left: "\uf0a4"
|
25
|
-
chevron-right: "\uf078"
|
26
|
-
chevron-up: "\uf0a2"
|
27
|
-
circle-slash: "\uf084"
|
28
|
-
circuit-board: "\uf0d6"
|
29
|
-
clippy: "\uf035"
|
30
|
-
clock: "\uf046"
|
31
|
-
cloud-download: "\uf00b"
|
32
|
-
cloud-upload: "\uf00c"
|
33
|
-
code: "\uf05f"
|
34
|
-
color-mode: "\uf065"
|
35
|
-
comment-add: "\uf02b"
|
36
|
-
comment: "\uf02b"
|
37
|
-
comment-discussion: "\uf04f"
|
38
|
-
credit-card: "\uf045"
|
39
|
-
dash: "\uf0ca"
|
40
|
-
dashboard: "\uf07d"
|
41
|
-
database: "\uf096"
|
42
|
-
clone: "\uf0dc"
|
43
|
-
desktop-download: "\uf0dc"
|
44
|
-
device-camera: "\uf056"
|
45
|
-
device-camera-video: "\uf057"
|
46
|
-
device-desktop: "\uf27c"
|
47
|
-
device-mobile: "\uf038"
|
48
|
-
diff: "\uf04d"
|
49
|
-
diff-added: "\uf06b"
|
50
|
-
diff-ignored: "\uf099"
|
51
|
-
diff-modified: "\uf06d"
|
52
|
-
diff-removed: "\uf06c"
|
53
|
-
diff-renamed: "\uf06e"
|
54
|
-
ellipsis: "\uf09a"
|
55
|
-
eye-unwatch: "\uf04e"
|
56
|
-
eye-watch: "\uf04e"
|
57
|
-
eye: "\uf04e"
|
58
|
-
file-binary: "\uf094"
|
59
|
-
file-code: "\uf010"
|
60
|
-
file-directory: "\uf016"
|
61
|
-
file-media: "\uf012"
|
62
|
-
file-pdf: "\uf014"
|
63
|
-
file-submodule: "\uf017"
|
64
|
-
file-symlink-directory: "\uf0b1"
|
65
|
-
file-symlink-file: "\uf0b0"
|
66
|
-
file-text: "\uf011"
|
67
|
-
file-zip: "\uf013"
|
68
|
-
flame: "\uf0d2"
|
69
|
-
fold: "\uf0cc"
|
70
|
-
gear: "\uf02f"
|
71
|
-
gift: "\uf042"
|
72
|
-
gist: "\uf00e"
|
73
|
-
gist-secret: "\uf08c"
|
74
|
-
git-branch-create: "\uf020"
|
75
|
-
git-branch-delete: "\uf020"
|
76
|
-
git-branch: "\uf020"
|
77
|
-
git-commit: "\uf01f"
|
78
|
-
git-compare: "\uf0ac"
|
79
|
-
git-merge: "\uf023"
|
80
|
-
git-pull-request-abandoned: "\uf009"
|
81
|
-
git-pull-request: "\uf009"
|
82
|
-
globe: "\uf0b6"
|
83
|
-
graph: "\uf043"
|
84
|
-
heart: "\u2665"
|
85
|
-
history: "\uf07e"
|
86
|
-
home: "\uf08d"
|
87
|
-
horizontal-rule: "\uf070"
|
88
|
-
hubot: "\uf09d"
|
89
|
-
inbox: "\uf0cf"
|
90
|
-
info: "\uf059"
|
91
|
-
issue-closed: "\uf028"
|
92
|
-
issue-opened: "\uf026"
|
93
|
-
issue-reopened: "\uf027"
|
94
|
-
jersey: "\uf019"
|
95
|
-
key: "\uf049"
|
96
|
-
keyboard: "\uf00d"
|
97
|
-
law: "\uf0d8"
|
98
|
-
light-bulb: "\uf000"
|
99
|
-
link: "\uf05c"
|
100
|
-
link-external: "\uf07f"
|
101
|
-
list-ordered: "\uf062"
|
102
|
-
list-unordered: "\uf061"
|
103
|
-
location: "\uf060"
|
104
|
-
gist-private: "\uf06a"
|
105
|
-
mirror-private: "\uf06a"
|
106
|
-
git-fork-private: "\uf06a"
|
107
|
-
lock: "\uf06a"
|
108
|
-
logo-github: "\uf092"
|
109
|
-
mail: "\uf03b"
|
110
|
-
mail-read: "\uf03c"
|
111
|
-
mail-reply: "\uf051"
|
112
|
-
mark-github: "\uf00a"
|
113
|
-
markdown: "\uf0c9"
|
114
|
-
megaphone: "\uf077"
|
115
|
-
mention: "\uf0be"
|
116
|
-
milestone: "\uf075"
|
117
|
-
mirror-public: "\uf024"
|
118
|
-
mirror: "\uf024"
|
119
|
-
mortar-board: "\uf0d7"
|
120
|
-
mute: "\uf080"
|
121
|
-
no-newline: "\uf09c"
|
122
|
-
octoface: "\uf008"
|
123
|
-
organization: "\uf037"
|
124
|
-
package: "\uf0c4"
|
125
|
-
paintcan: "\uf0d1"
|
126
|
-
pencil: "\uf058"
|
127
|
-
person-add: "\uf018"
|
128
|
-
person-follow: "\uf018"
|
129
|
-
person: "\uf018"
|
130
|
-
pin: "\uf041"
|
131
|
-
plug: "\uf0d4"
|
132
|
-
repo-create: "\uf05d"
|
133
|
-
gist-new: "\uf05d"
|
134
|
-
file-directory-create: "\uf05d"
|
135
|
-
file-add: "\uf05d"
|
136
|
-
plus: "\uf05d"
|
137
|
-
primitive-dot: "\uf052"
|
138
|
-
primitive-square: "\uf053"
|
139
|
-
pulse: "\uf085"
|
140
|
-
question: "\uf02c"
|
141
|
-
quote: "\uf063"
|
142
|
-
radio-tower: "\uf030"
|
143
|
-
repo-delete: "\uf001"
|
144
|
-
repo: "\uf001"
|
145
|
-
repo-clone: "\uf04c"
|
146
|
-
repo-force-push: "\uf04a"
|
147
|
-
gist-fork: "\uf002"
|
148
|
-
repo-forked: "\uf002"
|
149
|
-
repo-pull: "\uf006"
|
150
|
-
repo-push: "\uf005"
|
151
|
-
rocket: "\uf033"
|
152
|
-
rss: "\uf034"
|
153
|
-
ruby: "\uf047"
|
154
|
-
screen-full: "\uf066"
|
155
|
-
screen-normal: "\uf067"
|
156
|
-
search-save: "\uf02e"
|
157
|
-
search: "\uf02e"
|
158
|
-
server: "\uf097"
|
159
|
-
settings: "\uf07c"
|
160
|
-
shield: "\uf0e1"
|
161
|
-
log-in: "\uf036"
|
162
|
-
sign-in: "\uf036"
|
163
|
-
log-out: "\uf032"
|
164
|
-
sign-out: "\uf032"
|
165
|
-
squirrel: "\uf0b2"
|
166
|
-
star-add: "\uf02a"
|
167
|
-
star-delete: "\uf02a"
|
168
|
-
star: "\uf02a"
|
169
|
-
stop: "\uf08f"
|
170
|
-
repo-sync: "\uf087"
|
171
|
-
sync: "\uf087"
|
172
|
-
tag-remove: "\uf015"
|
173
|
-
tag-add: "\uf015"
|
174
|
-
tag: "\uf015"
|
175
|
-
telescope: "\uf088"
|
176
|
-
terminal: "\uf0c8"
|
177
|
-
three-bars: "\uf05e"
|
178
|
-
thumbsdown: "\uf0db"
|
179
|
-
thumbsup: "\uf0da"
|
180
|
-
tools: "\uf031"
|
181
|
-
trashcan: "\uf0d0"
|
182
|
-
triangle-down: "\uf05b"
|
183
|
-
triangle-left: "\uf044"
|
184
|
-
triangle-right: "\uf05a"
|
185
|
-
triangle-up: "\uf0aa"
|
186
|
-
unfold: "\uf039"
|
187
|
-
unmute: "\uf0ba"
|
188
|
-
versions: "\uf064"
|
189
|
-
watch: "\uf0e0"
|
190
|
-
remove-close: "\uf081"
|
191
|
-
x: "\uf081"
|
192
|
-
zap: "\u26a1"
|
Binary file
|
data/examples/fa-beer-inline.png
DELETED
Binary file
|
data/examples/fa-beer.png
DELETED
Binary file
|
data/examples/octicons.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
# All example code may be executed by calling `rake legend`
|
2
|
-
|
3
|
-
require_relative '../lib/prawn/icon'
|
4
|
-
require_relative 'example_helper'
|
5
|
-
|
6
|
-
Prawn::Document.generate('octicons.pdf') do
|
7
|
-
deja_path = File.join \
|
8
|
-
Prawn::Icon::FONTDIR, 'DejaVuSans.ttf'
|
9
|
-
|
10
|
-
font_families.update({
|
11
|
-
'deja' => { normal: deja_path }
|
12
|
-
})
|
13
|
-
|
14
|
-
font('deja')
|
15
|
-
|
16
|
-
icons = icon_keys(self, 'octicon')
|
17
|
-
required_pages = number_of_pages(self, 'octicon')
|
18
|
-
|
19
|
-
define_grid(columns: 6, rows: 12, gutter: 16)
|
20
|
-
|
21
|
-
sub_header = 'GitHub Octicons'
|
22
|
-
link = 'https://octicons.github.com'
|
23
|
-
page_header sub_header, link
|
24
|
-
|
25
|
-
first_page_icons icons do |icon_key|
|
26
|
-
# Just call the +icon+ method and pass in an icon key
|
27
|
-
icon icon_key, size: 20, align: :center
|
28
|
-
end
|
29
|
-
|
30
|
-
start_new_page
|
31
|
-
|
32
|
-
page_icons icons, required_pages do |icon_key|
|
33
|
-
icon icon_key, size: 20, align: :center
|
34
|
-
end
|
35
|
-
end
|