Class: Google::Apis::WebfontsV1::Webfont

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/webfonts_v1/classes.rb,
lib/google/apis/webfonts_v1/representations.rb,
lib/google/apis/webfonts_v1/representations.rb

Overview

Metadata describing a family of fonts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Webfont

Returns a new instance of Webfont.



117
118
119
# File 'lib/google/apis/webfonts_v1/classes.rb', line 117

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#axesArray<Google::Apis::WebfontsV1::Axis>

Axis for variable fonts. Corresponds to the JSON property axes

Returns:



63
64
65
# File 'lib/google/apis/webfonts_v1/classes.rb', line 63

def axes
  @axes
end

#categoryString

The category of the font. Corresponds to the JSON property category

Returns:

  • (String)


68
69
70
# File 'lib/google/apis/webfonts_v1/classes.rb', line 68

def category
  @category
end

#color_capabilitiesArray<String>

The color format(s) available for this family. Corresponds to the JSON property colorCapabilities

Returns:

  • (Array<String>)


73
74
75
# File 'lib/google/apis/webfonts_v1/classes.rb', line 73

def color_capabilities
  @color_capabilities
end

#familyString

The name of the font. Corresponds to the JSON property family

Returns:

  • (String)


78
79
80
# File 'lib/google/apis/webfonts_v1/classes.rb', line 78

def family
  @family
end

#filesHash<String,String>

The font files (with all supported scripts) for each one of the available variants, as a key : value map. Corresponds to the JSON property files

Returns:

  • (Hash<String,String>)


84
85
86
# File 'lib/google/apis/webfonts_v1/classes.rb', line 84

def files
  @files
end

#kindString

This kind represents a webfont object in the webfonts service. Corresponds to the JSON property kind

Returns:

  • (String)


89
90
91
# File 'lib/google/apis/webfonts_v1/classes.rb', line 89

def kind
  @kind
end

#last_modifiedString

The date (format "yyyy-MM-dd") the font was modified for the last time. Corresponds to the JSON property lastModified

Returns:

  • (String)


94
95
96
# File 'lib/google/apis/webfonts_v1/classes.rb', line 94

def last_modified
  @last_modified
end

Font URL for menu subset, a subset of the font that is enough to display the font name Corresponds to the JSON property menu

Returns:

  • (String)


100
101
102
# File 'lib/google/apis/webfonts_v1/classes.rb', line 100

def menu
  @menu
end

#subsetsArray<String>

The scripts supported by the font. Corresponds to the JSON property subsets

Returns:

  • (Array<String>)


105
106
107
# File 'lib/google/apis/webfonts_v1/classes.rb', line 105

def subsets
  @subsets
end

#variantsArray<String>

The available variants for the font. Corresponds to the JSON property variants

Returns:

  • (Array<String>)


110
111
112
# File 'lib/google/apis/webfonts_v1/classes.rb', line 110

def variants
  @variants
end

#versionString

The font version. Corresponds to the JSON property version

Returns:

  • (String)


115
116
117
# File 'lib/google/apis/webfonts_v1/classes.rb', line 115

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/google/apis/webfonts_v1/classes.rb', line 122

def update!(**args)
  @axes = args[:axes] if args.key?(:axes)
  @category = args[:category] if args.key?(:category)
  @color_capabilities = args[:color_capabilities] if args.key?(:color_capabilities)
  @family = args[:family] if args.key?(:family)
  @files = args[:files] if args.key?(:files)
  @kind = args[:kind] if args.key?(:kind)
  @last_modified = args[:last_modified] if args.key?(:last_modified)
  @menu = args[:menu] if args.key?(:menu)
  @subsets = args[:subsets] if args.key?(:subsets)
  @variants = args[:variants] if args.key?(:variants)
  @version = args[:version] if args.key?(:version)
end