dragonfly_fonts 0.0.8 → 1.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.
- checksums.yaml +5 -5
- data/CHANGELOG.md +7 -0
- data/README.md +16 -7
- data/dragonfly_fonts.gemspec +4 -2
- data/lib/dragonfly_fonts.rb +22 -1
- data/lib/dragonfly_fonts/analysers/bbox.rb +7 -5
- data/lib/dragonfly_fonts/analysers/font_info.rb +7 -2
- data/lib/dragonfly_fonts/analysers/glyphs.rb +12 -4
- data/lib/dragonfly_fonts/analysers/gsub_tables.rb +12 -4
- data/lib/dragonfly_fonts/analysers/ots_sanitize.rb +19 -0
- data/lib/dragonfly_fonts/plugin.rb +33 -8
- data/lib/dragonfly_fonts/processors/correct_metrics.rb +7 -4
- data/lib/dragonfly_fonts/processors/encode.rb +37 -23
- data/lib/dragonfly_fonts/processors/extract_glyph.rb +14 -10
- data/lib/dragonfly_fonts/processors/fix_dflt_table.rb +4 -1
- data/lib/dragonfly_fonts/processors/normalize_names.rb +6 -3
- data/lib/dragonfly_fonts/processors/ots_sanitize.rb +25 -0
- data/lib/dragonfly_fonts/processors/set_dimensions.rb +10 -6
- data/lib/dragonfly_fonts/processors/set_ttf_names.rb +9 -6
- data/lib/dragonfly_fonts/processors/set_underline.rb +10 -6
- data/lib/dragonfly_fonts/processors/set_width.rb +5 -2
- data/lib/dragonfly_fonts/processors/set_woff_metadata.rb +6 -3
- data/lib/dragonfly_fonts/processors/ttf_autohint.rb +6 -3
- data/lib/dragonfly_fonts/processors/web_friendly.rb +6 -3
- data/lib/dragonfly_fonts/version.rb +1 -1
- data/samples/sample.eot +0 -0
- data/samples/sample.otf +0 -0
- data/samples/sample.svg +1220 -0
- data/samples/sample.ttf +0 -0
- data/samples/{Inconsolata.ttx → sample.ttx} +0 -0
- data/samples/sample.woff +0 -0
- data/samples/sample.woff2 +0 -0
- data/samples/{AppleGothic.ttf → sample_not_sanitized.ttf} +0 -0
- data/script/glyphs.py +3 -3
- metadata +42 -9
- data/lib/dragonfly_fonts/analysers/ot_sanitise.rb +0 -17
- data/lib/dragonfly_fonts/processors/ot_sanitise.rb +0 -22
- data/samples/Arial.ttf +0 -0
- data/samples/Inconsolata.otf +0 -0
data/samples/sample.ttf
ADDED
Binary file
|
File without changes
|
data/samples/sample.woff
ADDED
Binary file
|
Binary file
|
File without changes
|
data/script/glyphs.py
CHANGED
@@ -7,9 +7,10 @@ def main():
|
|
7
7
|
font = fontforge.open(f)
|
8
8
|
|
9
9
|
glyphs = []
|
10
|
-
|
10
|
+
|
11
11
|
for (i,g) in enumerate(font.glyphs()):
|
12
12
|
glyphs.append({
|
13
|
+
'altuni': g.altuni,
|
13
14
|
'glyphname': g.glyphname,
|
14
15
|
'glyphclass': g.glyphclass,
|
15
16
|
'script': g.script,
|
@@ -20,6 +21,5 @@ def main():
|
|
20
21
|
|
21
22
|
print json.dumps(glyphs)
|
22
23
|
|
23
|
-
|
24
24
|
if __name__ == '__main__':
|
25
|
-
main()
|
25
|
+
main()
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dragonfly_fonts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: dragonfly
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +108,20 @@ dependencies:
|
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '5.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: minitest-reporters
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: rake
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,6 +144,7 @@ extensions: []
|
|
116
144
|
extra_rdoc_files: []
|
117
145
|
files:
|
118
146
|
- ".gitignore"
|
147
|
+
- CHANGELOG.md
|
119
148
|
- Dockerfile
|
120
149
|
- Gemfile
|
121
150
|
- Guardfile
|
@@ -130,14 +159,14 @@ files:
|
|
130
159
|
- lib/dragonfly_fonts/analysers/font_info.rb
|
131
160
|
- lib/dragonfly_fonts/analysers/glyphs.rb
|
132
161
|
- lib/dragonfly_fonts/analysers/gsub_tables.rb
|
133
|
-
- lib/dragonfly_fonts/analysers/
|
162
|
+
- lib/dragonfly_fonts/analysers/ots_sanitize.rb
|
134
163
|
- lib/dragonfly_fonts/plugin.rb
|
135
164
|
- lib/dragonfly_fonts/processors/correct_metrics.rb
|
136
165
|
- lib/dragonfly_fonts/processors/encode.rb
|
137
166
|
- lib/dragonfly_fonts/processors/extract_glyph.rb
|
138
167
|
- lib/dragonfly_fonts/processors/fix_dflt_table.rb
|
139
168
|
- lib/dragonfly_fonts/processors/normalize_names.rb
|
140
|
-
- lib/dragonfly_fonts/processors/
|
169
|
+
- lib/dragonfly_fonts/processors/ots_sanitize.rb
|
141
170
|
- lib/dragonfly_fonts/processors/set_dimensions.rb
|
142
171
|
- lib/dragonfly_fonts/processors/set_ttf_names.rb
|
143
172
|
- lib/dragonfly_fonts/processors/set_underline.rb
|
@@ -147,10 +176,14 @@ files:
|
|
147
176
|
- lib/dragonfly_fonts/processors/web_friendly.rb
|
148
177
|
- lib/dragonfly_fonts/unicode_ranges.rb
|
149
178
|
- lib/dragonfly_fonts/version.rb
|
150
|
-
- samples/
|
151
|
-
- samples/
|
152
|
-
- samples/
|
153
|
-
- samples/
|
179
|
+
- samples/sample.eot
|
180
|
+
- samples/sample.otf
|
181
|
+
- samples/sample.svg
|
182
|
+
- samples/sample.ttf
|
183
|
+
- samples/sample.ttx
|
184
|
+
- samples/sample.woff
|
185
|
+
- samples/sample.woff2
|
186
|
+
- samples/sample_not_sanitized.ttf
|
154
187
|
- script/dimensions.py
|
155
188
|
- script/font_info.py
|
156
189
|
- script/glyphs.py
|
@@ -179,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
212
|
version: '0'
|
180
213
|
requirements: []
|
181
214
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.
|
215
|
+
rubygems_version: 2.7.6
|
183
216
|
signing_key:
|
184
217
|
specification_version: 4
|
185
218
|
summary: Wraps common font-related tasks into Dragonfly analysers and processors.
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module DragonflyFonts
|
2
|
-
module Processors
|
3
|
-
# The OpenType Sanitiser (OTS) parses and serialises OpenType files (OTF, TTF) and WOFF and WOFF2 font files, validating them and sanitising them as it goes.
|
4
|
-
class OtSanitise
|
5
|
-
def call(content, _opts = {})
|
6
|
-
content.shell_update(ext: content.ext || :ttf) do |old_path, new_path|
|
7
|
-
"#{ot_sanitise_command} #{old_path} #{new_path}"
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
def update_url(attrs, *_args)
|
12
|
-
attrs.style = 'ot_sanitise'
|
13
|
-
end
|
14
|
-
|
15
|
-
private # =============================================================
|
16
|
-
|
17
|
-
def ot_sanitise_command
|
18
|
-
'ots-sanitize'
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
data/samples/Arial.ttf
DELETED
Binary file
|
data/samples/Inconsolata.otf
DELETED
Binary file
|