class Fuse::Document::Asset::Font

Constants

CSS_FORMATS
MIME_TYPES
VARIANT_PATTERN

Public Instance Methods

face() click to toggle source
# File lib/fuse/document/asset/font.rb, line 33
def face
  @face ||= [family, weight, style].join('-')
end
type() click to toggle source
Calls superclass method
# File lib/fuse/document/asset/font.rb, line 37
def type
  MIME_TYPES[extension.to_sym] || super
end
variant() click to toggle source
# File lib/fuse/document/asset/font.rb, line 22
def variant
  @variant ||= begin
    match = VARIANT_PATTERN.match(path)
    {
        family: match[1],
        weight: match[2] || 'normal',
        style:  match[3] || 'normal'
    }
  end
end