pdffonts 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/pdffonts +5 -3
- data/pdffonts.gemspec +1 -1
- metadata +3 -3
data/bin/pdffonts
CHANGED
@@ -18,12 +18,14 @@ files.each do |file|
|
|
18
18
|
puts bold(file) if multiple_files
|
19
19
|
|
20
20
|
# Find the strings in the PDF, look for a FontName descriptor
|
21
|
-
raw_list = `strings #{file} | grep FontName`
|
21
|
+
raw_list = `strings #{file.inspect} | grep FontName`
|
22
22
|
|
23
23
|
# Extract the font names from each line
|
24
24
|
font_names = raw_list.lines.map do |raw_line|
|
25
|
-
raw_line.match(/\/FontName
|
26
|
-
|
25
|
+
if match = raw_line.match(/\/FontName\s*\/[A-Z]{6}\+([^\/]*)\//)
|
26
|
+
match[1] && match[1].strip
|
27
|
+
end
|
28
|
+
end.uniq.compact
|
27
29
|
|
28
30
|
font_names.sort.each do |font|
|
29
31
|
puts blue(font)
|
data/pdffonts.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "pdffonts"
|
7
|
-
gem.version = "1.0.
|
7
|
+
gem.version = "1.0.1"
|
8
8
|
gem.authors = ["Pete Nicholls"]
|
9
9
|
gem.email = ["pete@metanation.com"]
|
10
10
|
gem.summary = %q{A command-line tool to display fonts embedded inside PDF documents.}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdffonts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -73,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
73
|
version: '0'
|
74
74
|
segments:
|
75
75
|
- 0
|
76
|
-
hash:
|
76
|
+
hash: 2346426602637004294
|
77
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
78
|
none: false
|
79
79
|
requirements:
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
segments:
|
84
84
|
- 0
|
85
|
-
hash:
|
85
|
+
hash: 2346426602637004294
|
86
86
|
requirements: []
|
87
87
|
rubyforge_project:
|
88
88
|
rubygems_version: 1.8.24
|