Class: Google::Apis::SlidesV1::WeightedFontFamily

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

Overview

Represents a font family and weight used to style a TextRun.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ WeightedFontFamily

Returns a new instance of WeightedFontFamily



5157
5158
5159
# File 'generated/google/apis/slides_v1/classes.rb', line 5157

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

Instance Attribute Details

#font_familyString

The font family of the text. The font family can be any font from the Font menu in Slides or from Google Fonts. If the font name is unrecognized, the text is rendered in Arial. Corresponds to the JSON property fontFamily

Returns:

  • (String)


5143
5144
5145
# File 'generated/google/apis/slides_v1/classes.rb', line 5143

def font_family
  @font_family
end

#weightFixnum

The rendered weight of the text. This field can have any value that is a multiple of 100 between 100 and 900, inclusive. This range corresponds to the numerical values described in the CSS 2.1 Specification, section 15.6, with non-numerical values disallowed. Weights greater than or equal to 700 are considered bold, and weights less than 700are not bold. The default value is 400 ("normal"). Corresponds to the JSON property weight

Returns:

  • (Fixnum)


5155
5156
5157
# File 'generated/google/apis/slides_v1/classes.rb', line 5155

def weight
  @weight
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5162
5163
5164
5165
# File 'generated/google/apis/slides_v1/classes.rb', line 5162

def update!(**args)
  @font_family = args[:font_family] if args.key?(:font_family)
  @weight = args[:weight] if args.key?(:weight)
end