Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

TextStyle

import type { TextStyle } from "https://googleapis.deno.dev/v1/docs:v1.ts";

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's 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.

interface TextStyle {
backgroundColor?: OptionalColor;
baselineOffset?:
| "BASELINE_OFFSET_UNSPECIFIED"
| "NONE"
| "SUPERSCRIPT"
| "SUBSCRIPT";
bold?: boolean;
fontSize?: Dimension;
foregroundColor?: OptionalColor;
italic?: boolean;
link?: Link;
smallCaps?: boolean;
strikethrough?: boolean;
underline?: boolean;
weightedFontFamily?: WeightedFontFamily;
}

§Properties

§
backgroundColor?: OptionalColor
[src]

The background color of the text. If set, the color is either an RGB color or transparent, depending on the color field.

§
baselineOffset?: "BASELINE_OFFSET_UNSPECIFIED" | "NONE" | "SUPERSCRIPT" | "SUBSCRIPT"
[src]

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. Changes in this field don't affect the font_size.

§
bold?: boolean
[src]

Whether or not the text is rendered as bold.

§
fontSize?: Dimension
[src]

The size of the text's font.

§
foregroundColor?: OptionalColor
[src]

The foreground color of the text. If set, the color is either an RGB color or transparent, depending on the color field.

§
italic?: boolean
[src]

Whether or not the text is italicized.

§
smallCaps?: boolean
[src]

Whether or not the text is in small capital letters.

§
strikethrough?: boolean
[src]

Whether or not the text is struck through.

§
underline?: boolean
[src]

Whether or not the text is underlined.

§
weightedFontFamily?: WeightedFontFamily
[src]

The font family and rendered weight of the text. If an update request specifies values for both weighted_font_family and bold, the weighted_font_family is applied first, then bold. If weighted_font_family#weight is not set, it defaults to 400. If weighted_font_family is set, then weighted_font_family#font_family must also be set with a non-empty value. Otherwise, a 400 bad request error is returned.