class Fontist::SystemIndex::PreferredFamily

Public Instance Methods

family_name(name) click to toggle source
# File lib/fontist/system_index.rb, line 23
def family_name(name)
  name.preferred_family || name.family
end
transform_override_keys(dict) click to toggle source
# File lib/fontist/system_index.rb, line 31
def transform_override_keys(dict)
  mapping = { preferred_family_name: :family_name, preferred_type: :type }
  dict.transform_keys! { |k| mapping[k] }
end
type(name) click to toggle source
# File lib/fontist/system_index.rb, line 27
def type(name)
  name.preferred_subfamily || name.subfamily
end