Class: Google::Apis::SlidesV1::TextStyle
- Inherits:
-
Object
- Object
- Google::Apis::SlidesV1::TextStyle
- 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 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
-
#background_color ⇒ Google::Apis::SlidesV1::OptionalColor
A color that can either be fully opaque or fully transparent.
-
#baseline_offset ⇒ String
The text's vertical offset from its normal position.
-
#bold ⇒ Boolean
(also: #bold?)
Whether or not the text is rendered as bold.
-
#font_family ⇒ String
The font family of the text.
-
#font_size ⇒ Google::Apis::SlidesV1::Dimension
A magnitude in a single direction in the specified units.
-
#foreground_color ⇒ Google::Apis::SlidesV1::OptionalColor
A color that can either be fully opaque or fully transparent.
-
#italic ⇒ Boolean
(also: #italic?)
Whether or not the text is italicized.
-
#link ⇒ Google::Apis::SlidesV1::Link
A hypertext link.
-
#small_caps ⇒ Boolean
(also: #small_caps?)
Whether or not the text is in small capital letters.
-
#strikethrough ⇒ Boolean
(also: #strikethrough?)
Whether or not the text is struck through.
-
#underline ⇒ Boolean
(also: #underline?)
Whether or not the text is underlined.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TextStyle
constructor
A new instance of TextStyle.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ TextStyle
Returns a new instance of TextStyle
3319 3320 3321 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3319 def initialize(**args) update!(**args) end |
Instance Attribute Details
#background_color ⇒ Google::Apis::SlidesV1::OptionalColor
A color that can either be fully opaque or fully transparent.
Corresponds to the JSON property backgroundColor
3261 3262 3263 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3261 def background_color @background_color end |
#baseline_offset ⇒ String
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
3256 3257 3258 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3256 def baseline_offset @baseline_offset end |
#bold ⇒ Boolean Also known as: bold?
Whether or not the text is rendered as bold.
Corresponds to the JSON property bold
3277 3278 3279 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3277 def bold @bold end |
#font_family ⇒ String
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
3294 3295 3296 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3294 def font_family @font_family end |
#font_size ⇒ Google::Apis::SlidesV1::Dimension
A magnitude in a single direction in the specified units.
Corresponds to the JSON property fontSize
3311 3312 3313 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3311 def font_size @font_size end |
#foreground_color ⇒ Google::Apis::SlidesV1::OptionalColor
A color that can either be fully opaque or fully transparent.
Corresponds to the JSON property foregroundColor
3283 3284 3285 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3283 def foreground_color @foreground_color end |
#italic ⇒ Boolean Also known as: italic?
Whether or not the text is italicized.
Corresponds to the JSON property italic
3305 3306 3307 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3305 def italic @italic end |
#link ⇒ Google::Apis::SlidesV1::Link
A hypertext link.
Corresponds to the JSON property link
3266 3267 3268 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3266 def link @link end |
#small_caps ⇒ Boolean Also known as: small_caps?
Whether or not the text is in small capital letters.
Corresponds to the JSON property smallCaps
3316 3317 3318 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3316 def small_caps @small_caps end |
#strikethrough ⇒ Boolean Also known as: strikethrough?
Whether or not the text is struck through.
Corresponds to the JSON property strikethrough
3299 3300 3301 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3299 def strikethrough @strikethrough end |
#underline ⇒ Boolean Also known as: underline?
Whether or not the text is underlined.
Corresponds to the JSON property underline
3271 3272 3273 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3271 def underline @underline end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 |
# File 'generated/google/apis/slides_v1/classes.rb', line 3324 def update!(**args) @baseline_offset = args[:baseline_offset] if args.key?(:baseline_offset) @background_color = args[:background_color] if args.key?(:background_color) @link = args[:link] if args.key?(:link) @underline = args[:underline] if args.key?(:underline) @bold = args[:bold] if args.key?(:bold) @foreground_color = args[:foreground_color] if args.key?(:foreground_color) @font_family = args[:font_family] if args.key?(:font_family) @strikethrough = args[:strikethrough] if args.key?(:strikethrough) @italic = args[:italic] if args.key?(:italic) @font_size = args[:font_size] if args.key?(:font_size) @small_caps = args[:small_caps] if args.key?(:small_caps) end |