TextStyleBuilder

A builder for text styles.

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#build()` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style` | Creates a text style from this builder. |
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#setBold(Boolean)` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` | Sets whether or not the text is bold. |
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#setFontFamily(String)` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` | Sets the text font family, such as "Arial". |
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#setFontSize(Integer)` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` | Sets the text font size in points. |
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#setForegroundColor(String)` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` | Sets the text font color. |
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#setForegroundColorObject(Color)` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` | Sets the text font color. |
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#setItalic(Boolean)` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` | Sets whether or not the text is italic. |
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#setStrikethrough(Boolean)` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` | Sets whether or not the text has strikethrough. |
| `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#setUnderline(Boolean)` | `https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` | Sets whether or not the text is underlined. |

## Detailed documentation

### `build()`

Creates a text style from this builder.

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style` --- A text style created from this builder.

*** ** * ** ***

### `setBold(bold)`

Sets whether or not the text is bold.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `bold` | `Boolean` | Whether or not the text is bold. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` --- The builder for chaining.

*** ** * ** ***

### `setFontFamily(fontFamily)`

Sets the text font family, such as "Arial".

#### Parameters

| Name | Type | Description |
|---|---|---|
| `fontFamily` | `String` | The desired font family. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` --- The builder for chaining.

*** ** * ** ***

### `setFontSize(fontSize)`

Sets the text font size in points.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `fontSize` | `Integer` | The desired font size. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` --- The builder for chaining.

*** ** * ** ***

### `setForegroundColor(cssString)`

Sets the text font color.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `cssString` | `String` | The desired font color in CSS notation (such as `'#ffffff'` or `'white'`). |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` --- The builder for chaining.

*** ** * ** ***

### `setForegroundColorObject(color)`

Sets the text font color.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `color` | `https://developers.google.com/apps-script/reference/spreadsheet/color` | The desired font color. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` --- The builder for chaining.

*** ** * ** ***

### `setItalic(italic)`

Sets whether or not the text is italic.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `italic` | `Boolean` | Whether or not the text is italic. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` --- The builder for chaining.

*** ** * ** ***

### `setStrikethrough(strikethrough)`

Sets whether or not the text has strikethrough.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `strikethrough` | `Boolean` | Whether or not the text has strikethrough. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` --- The builder for chaining.

*** ** * ** ***

### `setUnderline(underline)`

Sets whether or not the text is underlined.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `underline` | `Boolean` | Whether or not the text is underlined. |

#### Return


`https://developers.google.com/apps-script/reference/spreadsheet/text-style-builder#` --- The builder for chaining.