[]
        
(Showing Draft Content)

GC.Spread.Sheets.ThemeFont

Class: ThemeFont

Spread.Sheets.ThemeFont

Table of contents

Constructors

Methods

Constructors

constructor

new ThemeFont(name, headingFont, bodyFont, headingEastAsianFont?, bodyEastAsianFont?)

Represents a theme font.

example

//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

bodyEastAsianFont

bodyEastAsianFont(value?): any

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

example

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.


bodyFont

bodyFont(value?): any

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

example

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.


bodyFontScriptTypeface

bodyFontScriptTypeface(script, typeface?): any

Gets or sets the typeface depending on the font script.

example

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.


headingEastAsianFont

headingEastAsianFont(value?): any

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

example

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.


headingFont

headingFont(value?): any

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

example

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.


headingFontScriptTypeface

headingFontScriptTypeface(script, typeface?): any

Gets or sets the typeface depending on the font script.

example

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.


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.