lib/fontist.rb in fontist-1.17.1 vs lib/fontist.rb in fontist-1.18.2
- old
+ new
@@ -11,10 +11,11 @@
require "fontist/font"
require "fontist/formula"
require "fontist/system_font"
require "fontist/manifest"
require "fontist/helpers"
+require "fontist/config"
module Fontist
def self.ui
Fontist::Utils::UI
end
@@ -73,10 +74,14 @@
def self.system_file_path
Fontist.lib_path.join("fontist", "system.yml")
end
+ def self.excluded_fonts_path
+ Fontist.lib_path.join("fontist", "exclude.yml")
+ end
+
def self.system_index_path
Fontist.fontist_path.join("system_index.default_family.yml")
end
def self.system_preferred_family_index_path
@@ -115,9 +120,33 @@
!!@preferred_family
end
def self.preferred_family=(bool)
@preferred_family = bool
+ end
+
+ def self.open_timeout
+ config[:open_timeout]
+ end
+
+ def self.read_timeout
+ config[:read_timeout]
+ end
+
+ def self.config
+ Fontist::Config.instance.values
+ end
+
+ def self.config_path
+ Fontist.fontist_path.join("config.yml")
+ end
+
+ def self.use_cache?
+ instance_variable_defined?("@use_cache") ? @use_cache : true
+ end
+
+ def self.use_cache=(bool)
+ @use_cache = bool
end
def self.log_level=(level)
Fontist.ui.level = level
end