module Fontist
Constants
- VERSION
Public Class Methods
Source
# File lib/fontist.rb, line 125 def self.config Fontist::Config.instance.values end
Source
# File lib/fontist.rb, line 129 def self.config_path Fontist.fontist_path.join("config.yml") end
Source
# File lib/fontist.rb, line 25 def self.default_fontist_path Pathname.new(File.join(Dir.home, ".fontist")) end
Source
# File lib/fontist.rb, line 61 def self.downloads_path Fontist.fontist_path.join("downloads") end
Source
# File lib/fontist.rb, line 69 def self.excluded_fonts_path Fontist.lib_path.join("fontist", "exclude.yml") end
Source
# File lib/fontist.rb, line 81 def self.fontist_index_path Fontist.fontist_path.join("fontist_index.default_family.yml") end
Source
# File lib/fontist.rb, line 21 def self.fontist_path Pathname.new(ENV["FONTIST_PATH"] || default_fontist_path) end
Source
# File lib/fontist.rb, line 85 def self.fontist_preferred_family_index_path Fontist.fontist_path.join("fontist_index.preferred_family.yml") end
Source
# File lib/fontist.rb, line 37 def self.fontist_version_path Fontist.fontist_path.join("versions", formulas_version) end
Source
# File lib/fontist.rb, line 29 def self.fonts_path Pathname.new(config[:fonts_path]) end
Source
# File lib/fontist.rb, line 97 def self.formula_filename_index_path Fontist.formula_index_dir.join("filename_index.yml") end
Source
# File lib/fontist.rb, line 101 def self.formula_index_dir Fontist.fontist_version_path end
Source
# File lib/fontist.rb, line 89 def self.formula_index_path Fontist.formula_index_dir.join("formula_index.default_family.yml") end
Source
# File lib/fontist.rb, line 93 def self.formula_preferred_family_index_path Fontist.formula_index_dir.join("formula_index.preferred_family.yml") end
Source
# File lib/fontist.rb, line 105 def self.formula_size_limit_in_megabytes 300 end
Source
# File lib/fontist.rb, line 49 def self.formulas_path @formulas_path || Fontist.formulas_repo_path.join("Formulas") end
Source
# File lib/fontist.rb, line 53 def self.formulas_path=(path) @formulas_path = path end
Source
# File lib/fontist.rb, line 33 def self.formulas_repo_path Fontist.fontist_version_path.join("formulas") end
Source
# File lib/fontist.rb, line 157 def self.formulas_repo_path_exists! return true if Dir.exist?(Fontist.formulas_repo_path) raise Errors::MainRepoNotFoundError.new( "Please fetch formulas with `fontist update`.", ) end
Source
# File lib/fontist.rb, line 45 def self.formulas_repo_url "https://github.com/fontist/formulas.git" end
Source
# File lib/fontist.rb, line 153 def self.google_fonts_key ENV["GOOGLE_FONTS_API_KEY"] || config[:google_fonts_key] end
Source
# File lib/fontist.rb, line 149 def self.interactive=(bool) @interactive = bool end
Source
# File lib/fontist.rb, line 145 def self.interactive? @interactive || false end
Source
# File lib/fontist.rb, line 13 def self.lib_path Fontist.root_path.join("lib") end
Source
# File lib/fontist.rb, line 141 def self.log_level=(level) Fontist.ui.level = level end
Source
# File lib/fontist.rb, line 117 def self.open_timeout config[:open_timeout] end
Source
# File lib/fontist.rb, line 113 def self.preferred_family=(bool) @preferred_family = bool end
Source
# File lib/fontist.rb, line 109 def self.preferred_family? !!@preferred_family end
Source
# File lib/fontist.rb, line 57 def self.private_formulas_path Fontist.formulas_path.join("private") end
Source
# File lib/fontist.rb, line 121 def self.read_timeout config[:read_timeout] end
Source
# File lib/fontist.rb, line 17 def self.root_path Pathname.new(File.dirname(__dir__)) end
Source
# File lib/fontist.rb, line 65 def self.system_file_path Fontist.lib_path.join("fontist", "system.yml") end
Source
# File lib/fontist.rb, line 73 def self.system_index_path Fontist.fontist_path.join("system_index.default_family.yml") end
Source
# File lib/fontist.rb, line 77 def self.system_preferred_family_index_path Fontist.fontist_path.join("system_index.preferred_family.yml") end
Source
# File lib/fontist.rb, line 137 def self.use_cache=(bool) @use_cache = bool end
Source
# File lib/fontist.rb, line 133 def self.use_cache? instance_variable_defined?(:@use_cache) ? @use_cache : true end