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.



147
148
149
# File 'lib/google/apis/webfonts_v1/classes.rb', line 147

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:



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

def axes
  @axes
end

#categoryString

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

Returns:

  • (String)


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

def category
  @category
end

#color_capabilitiesArray<String>

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

Returns:

  • (Array<String>)


98
99
100
# File 'lib/google/apis/webfonts_v1/classes.rb', line 98

def color_capabilities
  @color_capabilities
end

#familyString

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

Returns:

  • (String)


103
104
105
# File 'lib/google/apis/webfonts_v1/classes.rb', line 103

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>)


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

def files
  @files
end

#kindString

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

Returns:

  • (String)


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

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)


119
120
121
# File 'lib/google/apis/webfonts_v1/classes.rb', line 119

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)


125
126
127
# File 'lib/google/apis/webfonts_v1/classes.rb', line 125

def menu
  @menu
end

#subsetsArray<String>

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

Returns:

  • (Array<String>)


130
131
132
# File 'lib/google/apis/webfonts_v1/classes.rb', line 130

def subsets
  @subsets
end

#tagsArray<Google::Apis::WebfontsV1::Tag>

The tags that apply to this family. Corresponds to the JSON property tags

Returns:



135
136
137
# File 'lib/google/apis/webfonts_v1/classes.rb', line 135

def tags
  @tags
end

#variantsArray<String>

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

Returns:

  • (Array<String>)


140
141
142
# File 'lib/google/apis/webfonts_v1/classes.rb', line 140

def variants
  @variants
end

#versionString

The font version. Corresponds to the JSON property version

Returns:

  • (String)


145
146
147
# File 'lib/google/apis/webfonts_v1/classes.rb', line 145

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/google/apis/webfonts_v1/classes.rb', line 152

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)
  @tags = args[:tags] if args.key?(:tags)
  @variants = args[:variants] if args.key?(:variants)
  @version = args[:version] if args.key?(:version)
end