[]
• 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);
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. |
▸ 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);
Name | Type |
---|---|
value? |
string |
any
If no value is set, returns the name of the theme font; otherwise, returns the theme font.
▸ 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);
Name | Type |
---|---|
value? |
string |
any
If no value is set, returns the name of the theme font; otherwise, returns the theme font.
▸ 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');
Name | Type | Description |
---|---|---|
script |
string |
The font script code. |
typeface? |
string |
- |
any
If only the script is set, returns the typeface; otherwise, the typeface be set.
▸ 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);
Name | Type |
---|---|
value? |
string |
any
If no value is set, returns the name of the theme font; otherwise, returns the theme font.
▸ 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);
Name | Type |
---|---|
value? |
string |
any
If no value is set, returns the name of the theme font; otherwise, returns the theme font.
▸ 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');
Name | Type | Description |
---|---|---|
script |
string |
The font script code. |
typeface? |
string |
- |
any
If only the script is set, returns the typeface; otherwise, the typeface be set.
▸ name(value?
): any
Gets or sets the name of the theme font.
Name | Type |
---|---|
value? |
string |
any
If no value is set, returns the name of the theme font; otherwise, returns the theme font.