# GC.Spread.Sheets.ThemeFont

## Content

# Class: ThemeFont

[Spread](../modules/GC.Spread).[Sheets](../modules/GC.Spread.Sheets).ThemeFont

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.ThemeFont#constructor)

### Methods

- [bodyEastAsianFont](GC.Spread.Sheets.ThemeFont#bodyeastasianfont)
- [bodyFont](GC.Spread.Sheets.ThemeFont#bodyfont)
- [bodyFontScriptTypeface](GC.Spread.Sheets.ThemeFont#bodyfontscripttypeface)
- [headingEastAsianFont](GC.Spread.Sheets.ThemeFont#headingeastasianfont)
- [headingFont](GC.Spread.Sheets.ThemeFont#headingfont)
- [headingFontScriptTypeface](GC.Spread.Sheets.ThemeFont#headingfontscripttypeface)
- [name](GC.Spread.Sheets.ThemeFont#name)

## Constructors

### <a id="constructor" name="constructor"></a> constructor

• **new ThemeFont**(`name`, `headingFont`, `bodyFont`, `headingEastAsianFont?`, `bodyEastAsianFont?`)

Represents a theme font.

**`example`**
```javascript
//This example creates a new SpreadTheme object.
var custom = new GC.Spread.Sheets.Theme("Custom");
custom.font().bodyEastAsianFont("SimSum");
sheet.currentTheme(custom);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the theme font. |
| `headingFont` | `string` | The name of the heading font of the Latin text. |
| `bodyFont` | `string` | The name of the body font of the Latin text. |
| `headingEastAsianFont?` | `string` | The name of the heading font of the East Asian. |
| `bodyEastAsianFont?` | `string` | The name of the body font of the East Asian. |

## Methods

### <a id="bodyeastasianfont" name="bodyeastasianfont"></a> bodyEastAsianFont

▸ **bodyEastAsianFont**(`value?`): `any`

Gets or sets the body font of the theme font of the East Asian.

**`example`**
```javascript
var custom = new GC.Spread.Sheets.Theme("Custom", "Cambria", "Calibri");
custom.font().bodyEastAsianFont("SimSum");
sheet.currentTheme(custom);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `string` |

#### Returns

`any`

If no value is set, returns the name of the theme font; otherwise, returns the theme font.

___

### <a id="bodyfont" name="bodyfont"></a> bodyFont

▸ **bodyFont**(`value?`): `any`

Gets or sets the body font of the theme font of the Latin text.

**`example`**
```javascript
var custom = new GC.Spread.Sheets.Theme("Custom", "Cambria", "Calibri");
custom.font().bodyFont("Calibri");
sheet.currentTheme(custom);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `string` |

#### Returns

`any`

If no value is set, returns the name of the theme font; otherwise, returns the theme font.

___

### <a id="bodyfontscripttypeface" name="bodyfontscripttypeface"></a> bodyFontScriptTypeface

▸ **bodyFontScriptTypeface**(`script`, `typeface?`): `any`

Gets or sets the typeface depending on the font script.

**`example`**
```javascript
var custom = new GC.Spread.Sheets.Theme("Custom");
// get the typeface depending on the font script
var typeface = custom.bodyFontScriptTypeface('Hans');
// set the typeface depending on the font script
custom.bodyFontScriptTypeface('Hans', 'SimSum');
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `script` | `string` | The font script code. |
| `typeface?` | `string` | - |

#### Returns

`any`

If only the script is set, returns the typeface; otherwise, the typeface be set.

___

### <a id="headingeastasianfont" name="headingeastasianfont"></a> headingEastAsianFont

▸ **headingEastAsianFont**(`value?`): `any`

Gets or sets the heading font of the theme font of the East Asian.

**`example`**
```javascript
var custom = new GC.Spread.Sheets.Theme("Custom", "Cambria", "Calibri");
custom.font().headingEastAsianFont("SimSum");
sheet.currentTheme(custom);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `string` |

#### Returns

`any`

If no value is set, returns the name of the theme font; otherwise, returns the theme font.

___

### <a id="headingfont" name="headingfont"></a> headingFont

▸ **headingFont**(`value?`): `any`

Gets or sets the heading font of the theme font of the Latin text.

**`example`**
```javascript
var custom = new GC.Spread.Sheets.Theme("Custom", "Cambria", "Calibri");
custom.font().headingFont("Calibri");
sheet.currentTheme(custom);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `string` |

#### Returns

`any`

If no value is set, returns the name of the theme font; otherwise, returns the theme font.

___

### <a id="headingfontscripttypeface" name="headingfontscripttypeface"></a> headingFontScriptTypeface

▸ **headingFontScriptTypeface**(`script`, `typeface?`): `any`

Gets or sets the typeface depending on the font script.

**`example`**
```javascript
var custom = new GC.Spread.Sheets.Theme("Custom");
// get the typeface depending on the font script
var typeface = custom.headingFontScriptTypeface('Hans');
// set the typeface depending on the font script
custom.headingFontScriptTypeface('Hans', 'SimSum');
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `script` | `string` | The font script code. |
| `typeface?` | `string` | - |

#### Returns

`any`

If only the script is set, returns the typeface; otherwise, the typeface be set.

___

### <a id="name" name="name"></a> name

▸ **name**(`value?`): `any`

Gets or sets the name of the theme font.

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `string` |

#### Returns

`any`

If no value is set, returns the name of the theme font; otherwise, returns the theme font.
