fontist 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/check_google.yml +28 -0
- data/.github/workflows/macosx.yml +3 -0
- data/.github/workflows/ubuntu.yml +1 -1
- data/.github/workflows/windows.yml +1 -1
- data/.gitignore +6 -0
- data/.hound.yml +2 -0
- data/.rubocop.yml +22 -0
- data/README.md +54 -0
- data/bin/check_google +8 -0
- data/bin/convert_formulas +8 -0
- data/bin/fontist +8 -0
- data/bin/generate_otfinfo +8 -0
- data/bin/import_google +8 -0
- data/bin/stripttc +0 -0
- data/fontist.gemspec +14 -1
- data/lib/fontist.rb +18 -13
- data/lib/fontist/cli.rb +118 -0
- data/lib/fontist/errors.rb +3 -0
- data/lib/fontist/font.rb +117 -2
- data/lib/fontist/font_formula.rb +7 -3
- data/lib/fontist/fontist_font.rb +70 -0
- data/lib/fontist/formula.rb +11 -8
- data/lib/fontist/formula_template.rb +103 -0
- data/lib/fontist/formulas.rb +41 -0
- data/lib/fontist/import.rb +9 -0
- data/lib/fontist/import/convert_formulas.rb +65 -0
- data/lib/fontist/import/create_formula.rb +74 -0
- data/lib/fontist/import/extractors.rb +5 -0
- data/lib/fontist/import/extractors/cab_extractor.rb +37 -0
- data/lib/fontist/import/extractors/extractor.rb +19 -0
- data/lib/fontist/import/extractors/ole_extractor.rb +41 -0
- data/lib/fontist/import/extractors/seven_zip_extractor.rb +44 -0
- data/lib/fontist/import/extractors/zip_extractor.rb +31 -0
- data/lib/fontist/import/files/collection_file.rb +48 -0
- data/lib/fontist/import/formula_builder.rb +115 -0
- data/lib/fontist/import/formula_serializer.rb +133 -0
- data/lib/fontist/import/google.rb +16 -0
- data/lib/fontist/import/google/fonts_public.md +10 -0
- data/lib/fontist/import/google/fonts_public.pb.rb +71 -0
- data/lib/fontist/import/google/fonts_public.proto +46 -0
- data/lib/fontist/import/google/new_fonts_fetcher.rb +121 -0
- data/lib/fontist/import/google/skiplist.yml +6 -0
- data/lib/fontist/import/google_check.rb +34 -0
- data/lib/fontist/import/google_import.rb +180 -0
- data/lib/fontist/import/helpers/hash_helper.rb +13 -0
- data/lib/fontist/import/helpers/system_helper.rb +20 -0
- data/lib/fontist/import/otf/font_file.rb +89 -0
- data/lib/fontist/import/otf_parser.rb +25 -0
- data/lib/fontist/import/otf_style.rb +29 -0
- data/lib/fontist/import/otfinfo/otfinfo_requirement.rb +22 -0
- data/lib/fontist/import/otfinfo/template.erb +20 -0
- data/lib/fontist/import/otfinfo_generate.rb +45 -0
- data/lib/fontist/import/recursive_extraction.rb +101 -0
- data/lib/fontist/import/template_helper.rb +19 -0
- data/lib/fontist/import/text_helper.rb +30 -0
- data/lib/fontist/system_font.rb +12 -18
- data/lib/fontist/utils.rb +4 -0
- data/lib/fontist/utils/cache.rb +69 -0
- data/lib/fontist/utils/downloader.rb +15 -2
- data/lib/fontist/utils/dsl.rb +4 -0
- data/lib/fontist/utils/dsl/font.rb +37 -0
- data/lib/fontist/utils/exe_extractor.rb +12 -19
- data/lib/fontist/utils/msi_extractor.rb +31 -0
- data/lib/fontist/utils/seven_zip_extractor.rb +41 -0
- data/lib/fontist/utils/system.rb +23 -0
- data/lib/fontist/utils/ui.rb +8 -0
- data/lib/fontist/utils/zip_extractor.rb +9 -4
- data/lib/fontist/version.rb +1 -1
- metadata +154 -49
- data/lib/fontist/formulas/andale_font.rb +0 -80
- data/lib/fontist/formulas/arial_black_font.rb +0 -79
- data/lib/fontist/formulas/cleartype_fonts.rb +0 -227
- data/lib/fontist/formulas/comic_font.rb +0 -78
- data/lib/fontist/formulas/courier_font.rb +0 -81
- data/lib/fontist/formulas/euphemia_font.rb +0 -85
- data/lib/fontist/formulas/georgia_font.rb +0 -80
- data/lib/fontist/formulas/impact_font.rb +0 -78
- data/lib/fontist/formulas/montserrat_font.rb +0 -132
- data/lib/fontist/formulas/ms_truetype_fonts.rb +0 -125
- data/lib/fontist/formulas/open_sans_fonts.rb +0 -263
- data/lib/fontist/formulas/overpass_font.rb +0 -73
- data/lib/fontist/formulas/source_fonts.rb +0 -109
- data/lib/fontist/formulas/stix_fonts.rb +0 -108
- data/lib/fontist/formulas/tahoma_font.rb +0 -147
- data/lib/fontist/formulas/webding_font.rb +0 -78
- data/spec/fontist/font_formula_spec.rb +0 -67
- data/spec/fontist/font_spec.rb +0 -113
- data/spec/fontist/formula_spec.rb +0 -67
- data/spec/fontist/formulas/andale_font_spec.rb +0 -29
- data/spec/fontist/formulas/arial_black_font_spec.rb +0 -29
- data/spec/fontist/formulas/cleartype_fonts_spec.rb +0 -38
- data/spec/fontist/formulas/comic_font_spec.rb +0 -29
- data/spec/fontist/formulas/courier_font_spec.rb +0 -29
- data/spec/fontist/formulas/euphemia_font_spec.rb +0 -29
- data/spec/fontist/formulas/georgia_font_spec.rb +0 -29
- data/spec/fontist/formulas/impact_font_spec.rb +0 -29
- data/spec/fontist/formulas/montserrat_font_spec.rb +0 -29
- data/spec/fontist/formulas/ms_truetype_fonts_spec.rb +0 -29
- data/spec/fontist/formulas/open_sans_fonts_spec.rb +0 -29
- data/spec/fontist/formulas/overpass_font_spec.rb +0 -29
- data/spec/fontist/formulas/source_fonts_spec.rb +0 -31
- data/spec/fontist/formulas/stix_fonts_spec.rb +0 -29
- data/spec/fontist/formulas/tahoma_font_spec.rb +0 -29
- data/spec/fontist/formulas/webding_font_spec.rb +0 -29
- data/spec/fontist/registry_spec.rb +0 -47
- data/spec/fontist/system_font_spec.rb +0 -44
- data/spec/fontist/utils/downloader_spec.rb +0 -35
- data/spec/fontist_spec.rb +0 -5
- data/spec/spec_helper.rb +0 -22
- data/spec/support/fontist_helper.rb +0 -10
data/lib/fontist/utils.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
require "fontist/utils/ui"
|
2
|
+
require "fontist/utils/system"
|
2
3
|
require "fontist/utils/dsl"
|
4
|
+
require "fontist/utils/dsl/font"
|
3
5
|
require "fontist/utils/downloader"
|
4
6
|
require "fontist/utils/zip_extractor"
|
5
7
|
require "fontist/utils/exe_extractor"
|
8
|
+
require "fontist/utils/msi_extractor"
|
9
|
+
require "fontist/utils/seven_zip_extractor"
|
6
10
|
|
7
11
|
module Fontist
|
8
12
|
module Utils
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module Fontist
|
2
|
+
module Utils
|
3
|
+
class Cache
|
4
|
+
def fetch(key)
|
5
|
+
map = load_cache
|
6
|
+
return downloaded_path(map[key]) if cache_exist?(map[key])
|
7
|
+
|
8
|
+
generated_file = yield
|
9
|
+
path = save_cache(generated_file, key, map)
|
10
|
+
|
11
|
+
downloaded_path(path)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def cache_map_path
|
17
|
+
Fontist.downloads_path.join("map.yml")
|
18
|
+
end
|
19
|
+
|
20
|
+
def load_cache
|
21
|
+
cache_map_path.exist? ? YAML.load_file(cache_map_path) : {}
|
22
|
+
end
|
23
|
+
|
24
|
+
def downloaded_path(path)
|
25
|
+
File.new(Fontist.downloads_path.join(path))
|
26
|
+
end
|
27
|
+
|
28
|
+
def cache_exist?(path)
|
29
|
+
path && File.exist?(Fontist.downloads_path.join(path))
|
30
|
+
end
|
31
|
+
|
32
|
+
def save_cache(generated_file, key, map)
|
33
|
+
path = move_to_downloads(generated_file)
|
34
|
+
map[key] = path
|
35
|
+
File.write(cache_map_path, YAML.dump(map))
|
36
|
+
path
|
37
|
+
end
|
38
|
+
|
39
|
+
def move_to_downloads(source)
|
40
|
+
create_downloads_directory
|
41
|
+
path = generate_file_path(source)
|
42
|
+
move(source, path)
|
43
|
+
relative_to_downloads(path)
|
44
|
+
end
|
45
|
+
|
46
|
+
def create_downloads_directory
|
47
|
+
unless Fontist.downloads_path.exist?
|
48
|
+
FileUtils.mkdir_p(Fontist.downloads_path)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def generate_file_path(source)
|
53
|
+
dir = Dir.mktmpdir(nil, Fontist.downloads_path)
|
54
|
+
filename = source.original_filename
|
55
|
+
File.join(dir, filename)
|
56
|
+
end
|
57
|
+
|
58
|
+
def move(source_file, target_path)
|
59
|
+
# Windows requires file descriptors to be closed before files are moved
|
60
|
+
source_file.close
|
61
|
+
FileUtils.mv(source_file.path, target_path)
|
62
|
+
end
|
63
|
+
|
64
|
+
def relative_to_downloads(path)
|
65
|
+
Pathname.new(path).relative_path_from(Fontist.downloads_path).to_s
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative "cache"
|
2
|
+
|
1
3
|
module Fontist
|
2
4
|
module Utils
|
3
5
|
class Downloader
|
@@ -7,10 +9,11 @@ module Fontist
|
|
7
9
|
@sha = [sha].flatten.compact
|
8
10
|
@progress_bar = set_progress_bar(progress_bar)
|
9
11
|
@file_size = (file_size || default_file_size).to_i
|
12
|
+
@cache = Cache.new
|
10
13
|
end
|
11
14
|
|
12
15
|
def download
|
13
|
-
file = download_file
|
16
|
+
file = @cache.fetch(@file) { download_file }
|
14
17
|
|
15
18
|
if !sha.empty? && !sha.include?(Digest::SHA256.file(file).to_s)
|
16
19
|
raise(Fontist::Errors::TamperedFileError.new(
|
@@ -49,15 +52,21 @@ module Fontist
|
|
49
52
|
def download_file
|
50
53
|
bar = ProgressBar.new(file_size / byte_to_megabyte)
|
51
54
|
|
52
|
-
Down.download(
|
55
|
+
file = Down.download(
|
53
56
|
@file,
|
54
57
|
open_timeout: 10,
|
55
58
|
read_timeout: 10,
|
59
|
+
content_length_proc: ->(content_length) {
|
60
|
+
bar.total = content_length / byte_to_megabyte if content_length
|
61
|
+
},
|
56
62
|
progress_proc: -> (progress) {
|
57
63
|
bar.increment(progress / byte_to_megabyte) if @progress_bar === true
|
58
64
|
}
|
59
65
|
)
|
60
66
|
|
67
|
+
puts if @progress_bar === true
|
68
|
+
|
69
|
+
file
|
61
70
|
rescue Down::NotFound
|
62
71
|
raise(Fontist::Errors::InvalidResourceError.new("Invalid URL: #{@file}"))
|
63
72
|
end
|
@@ -69,6 +78,10 @@ module Fontist
|
|
69
78
|
@total = total
|
70
79
|
end
|
71
80
|
|
81
|
+
def total=(total)
|
82
|
+
@total = total
|
83
|
+
end
|
84
|
+
|
72
85
|
def increment(progress)
|
73
86
|
complete = sprintf("%#.2f%%", ((@counter.to_f / @total.to_f) * 100))
|
74
87
|
print "\r\e[0KDownloads: #{@counter}MB/#{@total}MB (#{complete})"
|
data/lib/fontist/utils/dsl.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
module Fontist
|
2
|
+
module Utils
|
3
|
+
module Dsl
|
4
|
+
class Font
|
5
|
+
REQUIRED_ATTRIBUTES = %i[family_name
|
6
|
+
style
|
7
|
+
full_name
|
8
|
+
filename].freeze
|
9
|
+
|
10
|
+
attr_reader :attributes
|
11
|
+
|
12
|
+
def initialize(attributes)
|
13
|
+
REQUIRED_ATTRIBUTES.each do |required_attribute|
|
14
|
+
unless attributes[required_attribute]
|
15
|
+
raise(Fontist::Errors::MissingAttributeError.new(
|
16
|
+
"Missing attribute: #{required_attribute}"
|
17
|
+
))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
self.attributes = attributes
|
22
|
+
end
|
23
|
+
|
24
|
+
def attributes=(attrs)
|
25
|
+
@attributes = { family_name: attrs[:family_name],
|
26
|
+
type: attrs[:style],
|
27
|
+
full_name: attrs[:full_name],
|
28
|
+
post_script_name: attrs[:post_script_name],
|
29
|
+
version: attrs[:version],
|
30
|
+
description: attrs[:description],
|
31
|
+
copyright: attrs[:copyright],
|
32
|
+
font: attrs[:filename] }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Fontist
|
2
2
|
module Utils
|
3
3
|
module ExeExtractor
|
4
|
-
def cab_extract(exe_file, download: true,
|
4
|
+
def cab_extract(exe_file, download: true, font_ext: /.ttf|.otf|.ttc/i)
|
5
5
|
download = @downloaded === true ? false : download
|
6
6
|
|
7
7
|
exe_file = download_file(exe_file).path if download
|
@@ -9,12 +9,13 @@ module Fontist
|
|
9
9
|
cabbed_fonts = grep_fonts(cab_file.files, font_ext) || []
|
10
10
|
fonts_paths = extract_cabbed_fonts_to_assets(cabbed_fonts)
|
11
11
|
|
12
|
-
yield(fonts_paths)
|
12
|
+
block_given? ? yield(fonts_paths) : fonts_paths
|
13
13
|
end
|
14
14
|
|
15
15
|
def exe_extract(source)
|
16
16
|
cab_file = decompressor.search(download_file(source).path)
|
17
|
-
|
17
|
+
fonts_paths = build_cab_file_hash(cab_file.files)
|
18
|
+
block_given? ? yield(fonts_paths) : fonts_paths
|
18
19
|
end
|
19
20
|
|
20
21
|
private
|
@@ -47,25 +48,17 @@ module Fontist
|
|
47
48
|
end
|
48
49
|
|
49
50
|
def build_cab_file_hash(file)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
decompressor.extract(file, file_path)
|
57
|
-
cab_files[filename.to_s] = file_path
|
58
|
-
end
|
51
|
+
while file
|
52
|
+
filename = file.filename
|
53
|
+
if filename.include?("cab") || filename.include?("msi")
|
54
|
+
file_path = File.join(Dir.mktmpdir, filename)
|
55
|
+
decompressor.extract(file, file_path)
|
59
56
|
|
60
|
-
|
57
|
+
return file_path
|
61
58
|
end
|
62
|
-
end
|
63
|
-
end
|
64
59
|
|
65
|
-
|
66
|
-
|
67
|
-
NotImplementedError.new("You must implement this method"),
|
68
|
-
)
|
60
|
+
file = file.next
|
61
|
+
end
|
69
62
|
end
|
70
63
|
end
|
71
64
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Fontist
|
2
|
+
module Utils
|
3
|
+
module MsiExtractor
|
4
|
+
def msi_extract(resource)
|
5
|
+
file = @downloaded ? resource : download_file(resource)
|
6
|
+
|
7
|
+
cab_content = read_the_largest_file(file)
|
8
|
+
|
9
|
+
cab_file = Tempfile.new(["data", ".cab"], mode: File::BINARY)
|
10
|
+
cab_file.write(cab_content)
|
11
|
+
|
12
|
+
block_given? ? yield(cab_file.path) : cab_file.path
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def read_the_largest_file(file)
|
18
|
+
ole = storage.open(file)
|
19
|
+
the_largest_file = ole.dir.entries(".").max_by { |x| ole.file.size(x) }
|
20
|
+
ole.file.read(the_largest_file)
|
21
|
+
end
|
22
|
+
|
23
|
+
def storage
|
24
|
+
@storage ||= begin
|
25
|
+
require "ole/storage"
|
26
|
+
Ole::Storage
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Fontist
|
2
|
+
module Utils
|
3
|
+
module SevenZipExtractor
|
4
|
+
def seven_zip_extract(resource, extension: /\.cab$/)
|
5
|
+
file = download_file(resource)
|
6
|
+
|
7
|
+
extract_seven_zip_file(file, extension)
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def extract_seven_zip_file(file, extension)
|
13
|
+
File.open(file, "rb") do |zip_file|
|
14
|
+
reader.open(zip_file) do |szr|
|
15
|
+
path = extract_by_extension(szr, extension)
|
16
|
+
|
17
|
+
return block_given? ? yield(path) : path
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def reader
|
23
|
+
@reader ||= begin
|
24
|
+
require "seven_zip_ruby"
|
25
|
+
SevenZipRuby::Reader
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def extract_by_extension(szr, extension)
|
30
|
+
cab_entry = szr.entries.detect do |entry|
|
31
|
+
entry.file? && entry.path.match(extension)
|
32
|
+
end
|
33
|
+
|
34
|
+
tmp_dir = Dir.mktmpdir
|
35
|
+
szr.extract(cab_entry, tmp_dir)
|
36
|
+
filename = Pathname.new(cab_entry.path).basename
|
37
|
+
File.join(tmp_dir, filename)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Fontist
|
2
|
+
module Utils
|
3
|
+
module System
|
4
|
+
def self.user_os # rubocop:disable Metrics/MethodLength
|
5
|
+
@user_os ||= begin
|
6
|
+
host_os = RbConfig::CONFIG["host_os"]
|
7
|
+
case host_os
|
8
|
+
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
9
|
+
:windows
|
10
|
+
when /darwin|mac os/
|
11
|
+
:macos
|
12
|
+
when /linux/
|
13
|
+
:linux
|
14
|
+
when /solaris|bsd/
|
15
|
+
:unix
|
16
|
+
else
|
17
|
+
raise Fontist::Error, "unknown os: #{host_os.inspect}"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/fontist/utils/ui.rb
CHANGED
@@ -4,24 +4,28 @@ require "pathname"
|
|
4
4
|
module Fontist
|
5
5
|
module Utils
|
6
6
|
module ZipExtractor
|
7
|
+
# fonts_sub_dir is unused now, but formulas have this option
|
8
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
7
9
|
def zip_extract(resource, download: true, fonts_sub_dir: "")
|
8
10
|
zip_file = download_file(resource) if download
|
9
11
|
zip_file ||= resource.urls.first
|
10
12
|
|
11
|
-
fonts_paths = unzip_fonts(zip_file
|
13
|
+
fonts_paths = unzip_fonts(zip_file)
|
12
14
|
block_given? ? yield(fonts_paths) : fonts_paths
|
13
15
|
end
|
16
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
14
17
|
|
15
18
|
alias_method :unzip, :zip_extract
|
16
19
|
|
17
20
|
private
|
18
21
|
|
19
|
-
|
22
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
23
|
+
def unzip_fonts(file)
|
20
24
|
Zip.on_exists_proc = true
|
21
|
-
Array.new.tap do |fonts|
|
22
25
|
|
26
|
+
Array.new.tap do |fonts|
|
23
27
|
Zip::File.open(file) do |zip_file|
|
24
|
-
zip_file.glob("
|
28
|
+
zip_file.glob("**/*.{ttf,ttc,otf}").each do |entry|
|
25
29
|
if entry.name
|
26
30
|
filename = Pathname.new(entry.name).basename
|
27
31
|
font_path = fonts_path.join(filename.to_s)
|
@@ -33,6 +37,7 @@ module Fontist
|
|
33
37
|
end
|
34
38
|
end
|
35
39
|
end
|
40
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
36
41
|
end
|
37
42
|
end
|
38
43
|
end
|
data/lib/fontist/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fontist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
- Abu Nashir
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: down
|
@@ -53,6 +53,34 @@ dependencies:
|
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 2.3.0
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: seven_zip_ruby
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.0'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: ruby-ole
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '1.0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.0'
|
56
84
|
- !ruby/object:Gem::Dependency
|
57
85
|
name: thor
|
58
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,6 +95,20 @@ dependencies:
|
|
67
95
|
- - "~>"
|
68
96
|
- !ruby/object:Gem::Version
|
69
97
|
version: 1.0.1
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: git
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '1.0'
|
105
|
+
type: :runtime
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1.0'
|
70
112
|
- !ruby/object:Gem::Dependency
|
71
113
|
name: pry
|
72
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,85 +165,148 @@ dependencies:
|
|
123
165
|
- - "~>"
|
124
166
|
- !ruby/object:Gem::Version
|
125
167
|
version: '3.0'
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: rubocop
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - '='
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: 0.75.0
|
175
|
+
type: :development
|
176
|
+
prerelease: false
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - '='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: 0.75.0
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: rubocop-rails
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
type: :development
|
190
|
+
prerelease: false
|
191
|
+
version_requirements: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
- !ruby/object:Gem::Dependency
|
197
|
+
name: rubocop-performance
|
198
|
+
requirement: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
203
|
+
type: :development
|
204
|
+
prerelease: false
|
205
|
+
version_requirements: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - ">="
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0'
|
210
|
+
- !ruby/object:Gem::Dependency
|
211
|
+
name: ruby-protocol-buffers
|
212
|
+
requirement: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - "~>"
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '1.0'
|
217
|
+
type: :development
|
218
|
+
prerelease: false
|
219
|
+
version_requirements: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - "~>"
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: '1.0'
|
126
224
|
description: A libarary find or download fonts
|
127
225
|
email:
|
128
226
|
- operations@ribose.com
|
129
227
|
- abunashir@gmail.com
|
130
|
-
executables:
|
228
|
+
executables:
|
229
|
+
- fontist
|
131
230
|
extensions: []
|
132
231
|
extra_rdoc_files: []
|
133
232
|
files:
|
233
|
+
- ".github/workflows/check_google.yml"
|
134
234
|
- ".github/workflows/macosx.yml"
|
135
235
|
- ".github/workflows/ubuntu.yml"
|
136
236
|
- ".github/workflows/windows.yml"
|
137
237
|
- ".gitignore"
|
238
|
+
- ".hound.yml"
|
138
239
|
- ".rspec"
|
240
|
+
- ".rubocop.yml"
|
139
241
|
- Gemfile
|
140
242
|
- LICENSE.txt
|
141
243
|
- README.md
|
142
244
|
- Rakefile
|
245
|
+
- bin/check_google
|
143
246
|
- bin/console
|
247
|
+
- bin/convert_formulas
|
248
|
+
- bin/fontist
|
249
|
+
- bin/generate_otfinfo
|
250
|
+
- bin/import_google
|
144
251
|
- bin/rspec
|
145
252
|
- bin/setup
|
253
|
+
- bin/stripttc
|
146
254
|
- fontist.gemspec
|
147
255
|
- lib/fontist.rb
|
256
|
+
- lib/fontist/cli.rb
|
148
257
|
- lib/fontist/errors.rb
|
149
258
|
- lib/fontist/font.rb
|
150
259
|
- lib/fontist/font_formula.rb
|
260
|
+
- lib/fontist/fontist_font.rb
|
151
261
|
- lib/fontist/formula.rb
|
262
|
+
- lib/fontist/formula_template.rb
|
152
263
|
- lib/fontist/formulas.rb
|
153
|
-
- lib/fontist/
|
154
|
-
- lib/fontist/
|
155
|
-
- lib/fontist/
|
156
|
-
- lib/fontist/
|
157
|
-
- lib/fontist/
|
158
|
-
- lib/fontist/
|
159
|
-
- lib/fontist/
|
160
|
-
- lib/fontist/
|
161
|
-
- lib/fontist/
|
162
|
-
- lib/fontist/
|
163
|
-
- lib/fontist/
|
164
|
-
- lib/fontist/
|
165
|
-
- lib/fontist/
|
166
|
-
- lib/fontist/
|
167
|
-
- lib/fontist/
|
168
|
-
- lib/fontist/
|
264
|
+
- lib/fontist/import.rb
|
265
|
+
- lib/fontist/import/convert_formulas.rb
|
266
|
+
- lib/fontist/import/create_formula.rb
|
267
|
+
- lib/fontist/import/extractors.rb
|
268
|
+
- lib/fontist/import/extractors/cab_extractor.rb
|
269
|
+
- lib/fontist/import/extractors/extractor.rb
|
270
|
+
- lib/fontist/import/extractors/ole_extractor.rb
|
271
|
+
- lib/fontist/import/extractors/seven_zip_extractor.rb
|
272
|
+
- lib/fontist/import/extractors/zip_extractor.rb
|
273
|
+
- lib/fontist/import/files/collection_file.rb
|
274
|
+
- lib/fontist/import/formula_builder.rb
|
275
|
+
- lib/fontist/import/formula_serializer.rb
|
276
|
+
- lib/fontist/import/google.rb
|
277
|
+
- lib/fontist/import/google/fonts_public.md
|
278
|
+
- lib/fontist/import/google/fonts_public.pb.rb
|
279
|
+
- lib/fontist/import/google/fonts_public.proto
|
280
|
+
- lib/fontist/import/google/new_fonts_fetcher.rb
|
281
|
+
- lib/fontist/import/google/skiplist.yml
|
282
|
+
- lib/fontist/import/google_check.rb
|
283
|
+
- lib/fontist/import/google_import.rb
|
284
|
+
- lib/fontist/import/helpers/hash_helper.rb
|
285
|
+
- lib/fontist/import/helpers/system_helper.rb
|
286
|
+
- lib/fontist/import/otf/font_file.rb
|
287
|
+
- lib/fontist/import/otf_parser.rb
|
288
|
+
- lib/fontist/import/otf_style.rb
|
289
|
+
- lib/fontist/import/otfinfo/otfinfo_requirement.rb
|
290
|
+
- lib/fontist/import/otfinfo/template.erb
|
291
|
+
- lib/fontist/import/otfinfo_generate.rb
|
292
|
+
- lib/fontist/import/recursive_extraction.rb
|
293
|
+
- lib/fontist/import/template_helper.rb
|
294
|
+
- lib/fontist/import/text_helper.rb
|
169
295
|
- lib/fontist/registry.rb
|
170
296
|
- lib/fontist/system.yml
|
171
297
|
- lib/fontist/system_font.rb
|
172
298
|
- lib/fontist/utils.rb
|
299
|
+
- lib/fontist/utils/cache.rb
|
173
300
|
- lib/fontist/utils/downloader.rb
|
174
301
|
- lib/fontist/utils/dsl.rb
|
302
|
+
- lib/fontist/utils/dsl/font.rb
|
175
303
|
- lib/fontist/utils/exe_extractor.rb
|
304
|
+
- lib/fontist/utils/msi_extractor.rb
|
305
|
+
- lib/fontist/utils/seven_zip_extractor.rb
|
306
|
+
- lib/fontist/utils/system.rb
|
176
307
|
- lib/fontist/utils/ui.rb
|
177
308
|
- lib/fontist/utils/zip_extractor.rb
|
178
309
|
- lib/fontist/version.rb
|
179
|
-
- spec/fixtures/fonts/DejaVuSerif.ttf
|
180
|
-
- spec/fontist/font_formula_spec.rb
|
181
|
-
- spec/fontist/font_spec.rb
|
182
|
-
- spec/fontist/formula_spec.rb
|
183
|
-
- spec/fontist/formulas/andale_font_spec.rb
|
184
|
-
- spec/fontist/formulas/arial_black_font_spec.rb
|
185
|
-
- spec/fontist/formulas/cleartype_fonts_spec.rb
|
186
|
-
- spec/fontist/formulas/comic_font_spec.rb
|
187
|
-
- spec/fontist/formulas/courier_font_spec.rb
|
188
|
-
- spec/fontist/formulas/euphemia_font_spec.rb
|
189
|
-
- spec/fontist/formulas/georgia_font_spec.rb
|
190
|
-
- spec/fontist/formulas/impact_font_spec.rb
|
191
|
-
- spec/fontist/formulas/montserrat_font_spec.rb
|
192
|
-
- spec/fontist/formulas/ms_truetype_fonts_spec.rb
|
193
|
-
- spec/fontist/formulas/open_sans_fonts_spec.rb
|
194
|
-
- spec/fontist/formulas/overpass_font_spec.rb
|
195
|
-
- spec/fontist/formulas/source_fonts_spec.rb
|
196
|
-
- spec/fontist/formulas/stix_fonts_spec.rb
|
197
|
-
- spec/fontist/formulas/tahoma_font_spec.rb
|
198
|
-
- spec/fontist/formulas/webding_font_spec.rb
|
199
|
-
- spec/fontist/registry_spec.rb
|
200
|
-
- spec/fontist/system_font_spec.rb
|
201
|
-
- spec/fontist/utils/downloader_spec.rb
|
202
|
-
- spec/fontist_spec.rb
|
203
|
-
- spec/spec_helper.rb
|
204
|
-
- spec/support/fontist_helper.rb
|
205
310
|
homepage: https://github.com/fontist/fontist
|
206
311
|
licenses:
|
207
312
|
- BSD-2-Clause
|
@@ -209,7 +314,7 @@ metadata:
|
|
209
314
|
homepage_uri: https://github.com/fontist/fontist
|
210
315
|
source_code_uri: https://github.com/fontist/fontist
|
211
316
|
changelog_uri: https://github.com/fontist/fontist
|
212
|
-
post_install_message:
|
317
|
+
post_install_message: Please run `fontist update` to fetch formulas
|
213
318
|
rdoc_options: []
|
214
319
|
require_paths:
|
215
320
|
- lib
|
@@ -224,8 +329,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
329
|
- !ruby/object:Gem::Version
|
225
330
|
version: '0'
|
226
331
|
requirements: []
|
227
|
-
rubygems_version: 3.0.
|
228
|
-
signing_key:
|
332
|
+
rubygems_version: 3.0.3
|
333
|
+
signing_key:
|
229
334
|
specification_version: 4
|
230
335
|
summary: A libarary find or download fonts
|
231
336
|
test_files: []
|