Class: Google::Apis::SlidesV1::TextStyle

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

Overview

Represents the styling that can be applied to a TextRun. If this text is contained in a shape with a parent placeholder, then these text styles may be inherited from the parent. Which text styles are inherited depend on the nesting level of lists: * A text run in a paragraph that is not in a list will inherit its text style from the the newline character in the paragraph at the 0 nesting level of the list inside the parent placeholder. * A text run in a paragraph that is in a list will inherit its text style from the newline character in the paragraph at its corresponding nesting level of the list inside the parent placeholder. Inherited text styles are represented as unset fields in this message. If text is contained in a shape without a parent placeholder, unsetting these fields will revert the style to a value matching the defaults in the Slides editor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TextStyle

Returns a new instance of TextStyle.



4264
4265
4266
# File 'lib/google/apis/slides_v1/classes.rb', line 4264

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

Instance Attribute Details

#background_colorGoogle::Apis::SlidesV1::OptionalColor

A color that can either be fully opaque or fully transparent. Corresponds to the JSON property backgroundColor



4195
4196
4197
# File 'lib/google/apis/slides_v1/classes.rb', line 4195

def background_color
  @background_color
end

#baseline_offsetString

The text's vertical offset from its normal position. Text with SUPERSCRIPT or SUBSCRIPT baseline offsets is automatically rendered in a smaller font size, computed based on the font_size field. The font_size itself is not affected by changes in this field. Corresponds to the JSON property baselineOffset

Returns:

  • (String)


4203
4204
4205
# File 'lib/google/apis/slides_v1/classes.rb', line 4203

def baseline_offset
  @baseline_offset
end

#boldBoolean Also known as: bold?

Whether or not the text is rendered as bold. Corresponds to the JSON property bold

Returns:

  • (Boolean)


4208
4209
4210
# File 'lib/google/apis/slides_v1/classes.rb', line 4208

def bold
  @bold
end

#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. Some fonts can affect the weight of the text. If an update request specifies values for both font_family and bold, the explicitly-set bold value is used. Corresponds to the JSON property fontFamily

Returns:

  • (String)


4218
4219
4220
# File 'lib/google/apis/slides_v1/classes.rb', line 4218

def font_family
  @font_family
end

#font_sizeGoogle::Apis::SlidesV1::Dimension

A magnitude in a single direction in the specified units. Corresponds to the JSON property fontSize



4223
4224
4225
# File 'lib/google/apis/slides_v1/classes.rb', line 4223

def font_size
  @font_size
end

#foreground_colorGoogle::Apis::SlidesV1::OptionalColor

A color that can either be fully opaque or fully transparent. Corresponds to the JSON property foregroundColor



4228
4229
4230
# File 'lib/google/apis/slides_v1/classes.rb', line 4228

def foreground_color
  @foreground_color
end

#italicBoolean Also known as: italic?

Whether or not the text is italicized. Corresponds to the JSON property italic

Returns:

  • (Boolean)


4233
4234
4235
# File 'lib/google/apis/slides_v1/classes.rb', line 4233

def italic
  @italic
end

A hypertext link. Corresponds to the JSON property link



4239
4240
4241
# File 'lib/google/apis/slides_v1/classes.rb', line 4239

def link
  @link
end

#small_capsBoolean Also known as: small_caps?

Whether or not the text is in small capital letters. Corresponds to the JSON property smallCaps

Returns:

  • (Boolean)


4244
4245
4246
# File 'lib/google/apis/slides_v1/classes.rb', line 4244

def small_caps
  @small_caps
end

#strikethroughBoolean Also known as: strikethrough?

Whether or not the text is struck through. Corresponds to the JSON property strikethrough

Returns:

  • (Boolean)


4250
4251
4252
# File 'lib/google/apis/slides_v1/classes.rb', line 4250

def strikethrough
  @strikethrough
end

#underlineBoolean Also known as: underline?

Whether or not the text is underlined. Corresponds to the JSON property underline

Returns:

  • (Boolean)


4256
4257
4258
# File 'lib/google/apis/slides_v1/classes.rb', line 4256

def underline
  @underline
end

#weighted_font_familyGoogle::Apis::SlidesV1::WeightedFontFamily

Represents a font family and weight used to style a TextRun. Corresponds to the JSON property weightedFontFamily



4262
4263
4264
# File 'lib/google/apis/slides_v1/classes.rb', line 4262

def weighted_font_family
  @weighted_font_family
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
# File 'lib/google/apis/slides_v1/classes.rb', line 4269

def update!(**args)
  @background_color = args[:background_color] if args.key?(:background_color)
  @baseline_offset = args[:baseline_offset] if args.key?(:baseline_offset)
  @bold = args[:bold] if args.key?(:bold)
  @font_family = args[:font_family] if args.key?(:font_family)
  @font_size = args[:font_size] if args.key?(:font_size)
  @foreground_color = args[:foreground_color] if args.key?(:foreground_color)
  @italic = args[:italic] if args.key?(:italic)
  @link = args[:link] if args.key?(:link)
  @small_caps = args[:small_caps] if args.key?(:small_caps)
  @strikethrough = args[:strikethrough] if args.key?(:strikethrough)
  @underline = args[:underline] if args.key?(:underline)
  @weighted_font_family = args[:weighted_font_family] if args.key?(:weighted_font_family)
end