Class: Google::Apis::DocsV1::WeightedFontFamily
- Inherits:
-
Object
- Object
- Google::Apis::DocsV1::WeightedFontFamily
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/docs_v1/classes.rb,
lib/google/apis/docs_v1/representations.rb,
lib/google/apis/docs_v1/representations.rb
Overview
Represents a font family and weight of text.
Instance Attribute Summary collapse
-
#font_family ⇒ String
The font family of the text.
-
#weight ⇒ Fixnum
The weight of the font.
Instance Method Summary collapse
-
#initialize(**args) ⇒ WeightedFontFamily
constructor
A new instance of WeightedFontFamily.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ WeightedFontFamily
Returns a new instance of WeightedFontFamily.
6291 6292 6293 |
# File 'lib/google/apis/docs_v1/classes.rb', line 6291 def initialize(**args) update!(**args) end |
Instance Attribute Details
#font_family ⇒ String
The font family of the text. The font family can be any font from the Font
menu in Docs or from Google Fonts. If the font
name is unrecognized, the text is rendered in Arial.
Corresponds to the JSON property fontFamily
6272 6273 6274 |
# File 'lib/google/apis/docs_v1/classes.rb', line 6272 def font_family @font_family end |
#weight ⇒ Fixnum
The weight of the font. 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. The default value is 400 ("normal"). The font weight makes up
just one component of the rendered font weight. The rendered weight is
determined by a combination of the weight and the text style's resolved
bold value, after accounting for inheritance: * If the text is bold and the
weight is less than 400, the rendered weight is 400. * If the text is bold
and the weight is greater than or equal to 400 but is less than 700, the
rendered weight is 700. * If the weight is greater than or equal to 700,
the rendered weight is equal to the weight. * If the text is not bold, the
rendered weight is equal to the weight.
Corresponds to the JSON property weight
6289 6290 6291 |
# File 'lib/google/apis/docs_v1/classes.rb', line 6289 def weight @weight end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
6296 6297 6298 6299 |
# File 'lib/google/apis/docs_v1/classes.rb', line 6296 def update!(**args) @font_family = args[:font_family] if args.key?(:font_family) @weight = args[:weight] if args.key?(:weight) end |