module Fontist

Constants

VERSION

Public Class Methods

config() click to toggle source
# File lib/fontist.rb, line 135
def self.config
  Fontist::Config.instance.values
end
config_path() click to toggle source
# File lib/fontist.rb, line 139
def self.config_path
  Fontist.fontist_path.join("config.yml")
end
default_fontist_path() click to toggle source
# File lib/fontist.rb, line 35
def self.default_fontist_path
  Pathname.new(File.join(Dir.home, ".fontist"))
end
downloads_path() click to toggle source
# File lib/fontist.rb, line 71
def self.downloads_path
  Fontist.fontist_path.join("downloads")
end
excluded_fonts_path() click to toggle source
# File lib/fontist.rb, line 79
def self.excluded_fonts_path
  Fontist.lib_path.join("fontist", "exclude.yml")
end
fontist_index_path() click to toggle source
# File lib/fontist.rb, line 91
def self.fontist_index_path
  Fontist.fontist_path.join("fontist_index.default_family.yml")
end
fontist_path() click to toggle source
# File lib/fontist.rb, line 31
def self.fontist_path
  Pathname.new(ENV["FONTIST_PATH"] || default_fontist_path)
end
fontist_preferred_family_index_path() click to toggle source
# File lib/fontist.rb, line 95
def self.fontist_preferred_family_index_path
  Fontist.fontist_path.join("fontist_index.preferred_family.yml")
end
fontist_version_path() click to toggle source
# File lib/fontist.rb, line 47
def self.fontist_version_path
  Fontist.fontist_path.join("versions", formulas_version)
end
fonts_path() click to toggle source
# File lib/fontist.rb, line 39
def self.fonts_path
  Pathname.new(config[:fonts_path])
end
formula_filename_index_path() click to toggle source
# File lib/fontist.rb, line 107
def self.formula_filename_index_path
  Fontist.formula_index_dir.join("filename_index.yml")
end
formula_index_dir() click to toggle source
# File lib/fontist.rb, line 111
def self.formula_index_dir
  Fontist.fontist_version_path
end
formula_index_path() click to toggle source
# File lib/fontist.rb, line 99
def self.formula_index_path
  Fontist.formula_index_dir.join("formula_index.default_family.yml")
end
formula_preferred_family_index_path() click to toggle source
# File lib/fontist.rb, line 103
def self.formula_preferred_family_index_path
  Fontist.formula_index_dir.join("formula_index.preferred_family.yml")
end
formula_size_limit_in_megabytes() click to toggle source
# File lib/fontist.rb, line 115
def self.formula_size_limit_in_megabytes
  300
end
formulas_path() click to toggle source
# File lib/fontist.rb, line 59
def self.formulas_path
  @formulas_path || Fontist.formulas_repo_path.join("Formulas")
end
formulas_path=(path) click to toggle source
# File lib/fontist.rb, line 63
def self.formulas_path=(path)
  @formulas_path = path
end
formulas_repo_path() click to toggle source
# File lib/fontist.rb, line 43
def self.formulas_repo_path
  Fontist.fontist_version_path.join("formulas")
end
formulas_repo_url() click to toggle source
# File lib/fontist.rb, line 55
def self.formulas_repo_url
  "https://github.com/fontist/formulas.git"
end
formulas_version() click to toggle source
# File lib/fontist.rb, line 51
def self.formulas_version
  "v4"
end
google_fonts_key() click to toggle source
# File lib/fontist.rb, line 163
def self.google_fonts_key
  ENV["GOOGLE_FONTS_API_KEY"] || config[:google_fonts_key]
end
interactive=(bool) click to toggle source
# File lib/fontist.rb, line 159
def self.interactive=(bool)
  @interactive = bool
end
interactive?() click to toggle source
# File lib/fontist.rb, line 155
def self.interactive?
  @interactive || false
end
lib_path() click to toggle source
# File lib/fontist.rb, line 23
def self.lib_path
  Fontist.root_path.join("lib")
end
log_level=(level) click to toggle source
# File lib/fontist.rb, line 151
def self.log_level=(level)
  Fontist.ui.level = level
end
open_timeout() click to toggle source
# File lib/fontist.rb, line 127
def self.open_timeout
  config[:open_timeout]
end
preferred_family=(bool) click to toggle source
# File lib/fontist.rb, line 123
def self.preferred_family=(bool)
  @preferred_family = bool
end
preferred_family?() click to toggle source
# File lib/fontist.rb, line 119
def self.preferred_family?
  !!@preferred_family
end
private_formulas_path() click to toggle source
# File lib/fontist.rb, line 67
def self.private_formulas_path
  Fontist.formulas_path.join("private")
end
read_timeout() click to toggle source
# File lib/fontist.rb, line 131
def self.read_timeout
  config[:read_timeout]
end
root_path() click to toggle source
# File lib/fontist.rb, line 27
def self.root_path
  Pathname.new(File.dirname(__dir__))
end
system_file_path() click to toggle source
# File lib/fontist.rb, line 75
def self.system_file_path
  Fontist.lib_path.join("fontist", "system.yml")
end
system_index_path() click to toggle source
# File lib/fontist.rb, line 83
def self.system_index_path
  Fontist.fontist_path.join("system_index.default_family.yml")
end
system_preferred_family_index_path() click to toggle source
# File lib/fontist.rb, line 87
def self.system_preferred_family_index_path
  Fontist.fontist_path.join("system_index.preferred_family.yml")
end
ui() click to toggle source
# File lib/fontist.rb, line 19
def self.ui
  Fontist::Utils::UI
end
use_cache=(bool) click to toggle source
# File lib/fontist.rb, line 147
def self.use_cache=(bool)
  @use_cache = bool
end
use_cache?() click to toggle source
# File lib/fontist.rb, line 143
def self.use_cache?
  instance_variable_defined?("@use_cache") ? @use_cache : true
end