[]
• new ThemeFont(name, headingFont, bodyFont, headingEastAsianFont?, bodyEastAsianFont?)
表示主题字体。
example
//此示例创建一个新的SpreadTheme对象。
var custom = new GC.Spread.Sheets.Theme("Custom");
custom.font().bodyEastAsianFont("SimSum");
sheet.currentTheme(custom);
| Name | Type | Description |
|---|---|---|
name |
string |
主题字体的名称。 |
headingFont |
string |
拉丁文本标题字体的名称。 |
bodyFont |
string |
拉丁文本正文字体的名称。 |
headingEastAsianFont? |
string |
东亚文本标题字体的名称。 |
bodyEastAsianFont? |
string |
东亚文本正文字体的名称。 |
▸ bodyEastAsianFont(value?): any
获取或设置东亚文本主题字体的正文字体。
example
var custom = new GC.Spread.Sheets.Theme("Custom", null, "Cambria", "Calibri");
custom.font().bodyEastAsianFont("SimSum");
sheet.currentTheme(custom);
| Name | Type |
|---|---|
value? |
string |
any
如果未设置值,则返回主题字体的名称;否则返回主题字体。
▸ bodyFont(value?): any
获取或设置拉丁文本主题字体的正文字体。
example
var custom = new GC.Spread.Sheets.Theme("Custom", null, "Cambria", "Calibri");
custom.font().bodyFont("Calibri");
sheet.currentTheme(custom);
| Name | Type |
|---|---|
value? |
string |
any
如果未设置值,则返回主题字体的名称;否则返回主题字体。
▸ bodyFontScriptTypeface(script, typeface?): any
根据字体脚本获取或设置字体。
example
var custom = new GC.Spread.Sheets.Theme("Custom");
// 根据字体脚本获取字体
var typeface = custom.bodyFontScriptTypeface('Hans');
// 根据字体脚本设置字体
custom.bodyFontScriptTypeface('Hans', 'SimSum');
| Name | Type | Description |
|---|---|---|
script |
string |
字体脚本代码。 |
typeface? |
string |
- |
any
如果只设置了脚本,则返回字体;否则设置字体。
▸ headingEastAsianFont(value?): any
获取或设置东亚文本主题字体的标题字体。
example
var custom = new GC.Spread.Sheets.Theme("Custom", null, "Cambria", "Calibri");
custom.font().headingEastAsianFont("SimSum");
sheet.currentTheme(custom);
| Name | Type |
|---|---|
value? |
string |
any
如果未设置值,则返回主题字体的名称;否则返回主题字体。
▸ headingFont(value?): any
获取或设置拉丁文本主题字体的标题字体。
example
var custom = new GC.Spread.Sheets.Theme("Custom", null, "Cambria", "Calibri");
custom.font().headingFont("Calibri");
sheet.currentTheme(custom);
| Name | Type |
|---|---|
value? |
string |
any
如果未设置值,则返回主题字体的名称;否则返回主题字体。
▸ headingFontScriptTypeface(script, typeface?): any
根据字体脚本获取或设置字体。
example
var custom = new GC.Spread.Sheets.Theme("Custom");
// 根据字体脚本获取字体
var typeface = custom.headingFontScriptTypeface('Hans');
// 根据字体脚本设置字体
custom.headingFontScriptTypeface('Hans', 'SimSum');
| Name | Type | Description |
|---|---|---|
script |
string |
字体脚本代码。 |
typeface? |
string |
- |
any
如果只设置了脚本,则返回字体;否则设置字体。
▸ name(value?): any
获取或设置主题字体的名称。
| Name | Type |
|---|---|
value? |
string |
any
如果未设置值,则返回主题字体的名称;否则返回主题字体。