Class: Google::Apis::DocsV1::TextStyle
- Inherits:
-
Object
- Object
- Google::Apis::DocsV1::TextStyle
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/docs_v1/classes.rb,
generated/google/apis/docs_v1/representations.rb,
generated/google/apis/docs_v1/representations.rb more...
Overview
Represents the styling that can be applied to text. Inherited text styles are represented as unset fields in this message. A text style's parent depends on where the text style is defined:
- The TextStyle of text in a Paragraph inherits from the paragraph's corresponding named style type.
- The TextStyle on a named style inherits from the normal text named style.
- The TextStyle of the normal text named style inherits from the default text style in the Docs editor.
- The TextStyle on a Paragraph element that is contained in a table may inherit its text style from the table style. If the text style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor.
Instance Attribute Summary collapse
-
#background_color ⇒ Google::Apis::DocsV1::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_size ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
-
#foreground_color ⇒ Google::Apis::DocsV1::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::DocsV1::Link
A reference to another portion of a document or an external URL resource.
-
#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.
-
#weighted_font_family ⇒ Google::Apis::DocsV1::WeightedFontFamily
Represents a font family and weight of text.
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
5104 5105 5106 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5104 def initialize(**args) update!(**args) end |
Instance Attribute Details
#background_color ⇒ Google::Apis::DocsV1::OptionalColor
A color that can either be fully opaque or fully transparent.
Corresponds to the JSON property backgroundColor
5044 5045 5046 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5044 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
5052 5053 5054 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5052 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
5057 5058 5059 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5057 def bold @bold end |
#font_size ⇒ Google::Apis::DocsV1::Dimension
A magnitude in a single direction in the specified units.
Corresponds to the JSON property fontSize
5063 5064 5065 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5063 def font_size @font_size end |
#foreground_color ⇒ Google::Apis::DocsV1::OptionalColor
A color that can either be fully opaque or fully transparent.
Corresponds to the JSON property foregroundColor
5068 5069 5070 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5068 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
5073 5074 5075 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5073 def italic @italic end |
#link ⇒ Google::Apis::DocsV1::Link
A reference to another portion of a document or an external URL resource.
Corresponds to the JSON property link
5079 5080 5081 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5079 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
5084 5085 5086 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5084 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
5090 5091 5092 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5090 def strikethrough @strikethrough end |
#underline ⇒ Boolean Also known as: underline?
Whether or not the text is underlined.
Corresponds to the JSON property underline
5096 5097 5098 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5096 def underline @underline end |
#weighted_font_family ⇒ Google::Apis::DocsV1::WeightedFontFamily
Represents a font family and weight of text.
Corresponds to the JSON property weightedFontFamily
5102 5103 5104 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5102 def weighted_font_family @weighted_font_family end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 |
# File 'generated/google/apis/docs_v1/classes.rb', line 5109 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_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 |