Word.Interfaces.FontData interface
一个接口,用于描述通过调用 font.toJSON()返回的数据。
属性
| all |
指定字体的格式是否设置为所有大写字母,这会使小写字母显示为大写字母。 可能值包括:
|
| bold | 指定字体是否为粗体。
|
| bold |
指定字体是否在从右到左的语言文档中设置为粗体。 可能值包括:
|
| borders | 返回一个 |
| color | 指定字体的颜色。 可以采用“#RRGGBB”格式或颜色名称提供值。 |
| color |
指定一个 |
| color |
指定从右到左语言文档中对象的颜色 |
| contextual |
指定是否为字体启用上下文替换。 |
| diacritic |
指定要用于对象的音调符号 |
| disable |
指定Microsoft Word是否忽略相应 |
| double |
指定字体是否具有双删除线。
|
| emboss | 指定字体的格式是否为浮雕。 可能值包括:
|
| emphasis |
指定一个 |
| engrave | 指定字体的格式是否为刻字。 可能值包括:
|
| fill | 返回一个 |
| glow | 返回一个 |
| hidden | 指定字体是否标记为隐藏。
|
| highlight |
指定突出显示颜色。 若要设置它,请使用“#RRGGBB”格式或颜色名称的值。 若要删除突出显示颜色,请将其设置为 |
| italic | 指定字体是否斜体。
|
| italic |
指定字体是否在从右到左的语言文档中斜体。 可能值包括:
|
| kerning | 指定Microsoft Word自动调整字距的最小字号。 |
| ligature | 指定 对象的连字设置 |
| line | 返回一个 |
| name | 指定字体的名称。 |
| name |
指定用于拉丁文文本 (字符的字体,其字符代码从 0 (零) 到 127) 。 |
| name |
指定从右到左语言文档中的字体名称。 |
| name |
指定东亚字体名称。 |
| name |
指定用于代码介于 128 到 255 的字符的字体。 |
| number |
指定 OpenType 字体的数字形式设置。 |
| number |
指定字体的数字间距设置。 |
| outline | 指定字体的格式是否为大纲格式。 可能值包括:
|
| position | 指定文本 (相对于底线) 磅的位置。 |
| reflection | 返回一个 |
| scaling | 指定应用于字体的缩放百分比。 |
| shadow | 指定字体的格式是否为阴影。 可能值包括:
|
| size | 指定字号(以磅为单位)。 |
| size |
指定从右到左的文本的字号(以磅为单位)。 |
| small |
指定字体的格式是否设置为小写字母,使小写字母显示为小写字母。 可能值包括:
|
| spacing | 指定字符之间的间距。 |
| strike |
指定字体是否具有删除线。
|
| stylistic |
指定字体的样式集。 |
| subscript | 指定字体是否为下标。
|
| superscript | 指定字体是否为上标。
|
| text |
返回一个 |
| text |
返回一个 |
| three |
返回一个 |
| underline | 指定字体的下划线类型。
|
| underline |
指定对象的下划线 |
属性详细信息
allCaps
指定字体的格式是否设置为所有大写字母,这会使小写字母显示为大写字母。 可能值包括:
true:所有文本都具有 All Caps 属性。false:没有文本具有 All Caps 属性。null:如果文本的某些(但不是全部)具有 All Caps 属性,则返回 。
allCaps?: boolean;
属性值
boolean
注解
bold
boldBidirectional
指定字体是否在从右到左的语言文档中设置为粗体。 可能值包括:
true:所有文本都加粗。false:文本均不加粗。null:如果部分文本(但不是全部)为粗体,则返回 。
boldBidirectional?: boolean;
属性值
boolean
注解
borders
返回一个 BorderUniversalCollection 对象,该对象代表字体的所有边框。
borders?: Word.Interfaces.BorderUniversalData[];
属性值
注解
color
colorIndex
指定一个 ColorIndex 值,该值表示字体的颜色。
colorIndex?: Word.ColorIndex | "Auto" | "Black" | "Blue" | "Turquoise" | "BrightGreen" | "Pink" | "Red" | "Yellow" | "White" | "DarkBlue" | "Teal" | "Green" | "Violet" | "DarkRed" | "DarkYellow" | "Gray50" | "Gray25" | "ClassicRed" | "ClassicBlue" | "ByAuthor";
属性值
Word.ColorIndex | "Auto" | "Black" | "Blue" | "Turquoise" | "BrightGreen" | "Pink" | "Red" | "Yellow" | "White" | "DarkBlue" | "Teal" | "Green" | "Violet" | "DarkRed" | "DarkYellow" | "Gray50" | "Gray25" | "ClassicRed" | "ClassicBlue" | "ByAuthor"
注解
colorIndexBidirectional
指定从右到左语言文档中对象的颜色 Font 。
colorIndexBidirectional?: Word.ColorIndex | "Auto" | "Black" | "Blue" | "Turquoise" | "BrightGreen" | "Pink" | "Red" | "Yellow" | "White" | "DarkBlue" | "Teal" | "Green" | "Violet" | "DarkRed" | "DarkYellow" | "Gray50" | "Gray25" | "ClassicRed" | "ClassicBlue" | "ByAuthor";
属性值
Word.ColorIndex | "Auto" | "Black" | "Blue" | "Turquoise" | "BrightGreen" | "Pink" | "Red" | "Yellow" | "White" | "DarkBlue" | "Teal" | "Green" | "Violet" | "DarkRed" | "DarkYellow" | "Gray50" | "Gray25" | "ClassicRed" | "ClassicBlue" | "ByAuthor"
注解
contextualAlternates
diacriticColor
指定要用于对象的音调符号 Font 的颜色。 可以采用“#RRGGBB”格式提供值。
diacriticColor?: string;
属性值
string
注解
disableCharacterSpaceGrid
指定Microsoft Word是否忽略相应Font对象的每行字符数。
disableCharacterSpaceGrid?: boolean;
属性值
boolean
注解
doubleStrikeThrough
指定字体是否具有双删除线。
true 如果字体的格式设置为双删除线文本,则为 ;否则为 false。
doubleStrikeThrough?: boolean;
属性值
boolean
注解
emboss
指定字体的格式是否为浮雕。 可能值包括:
true:所有文本都已浮雕。false:文本均未浮雕。null:如果部分(但不是全部)文本已浮雕,则返回 。
emboss?: boolean;
属性值
boolean
注解
emphasisMark
指定一个 EmphasisMark 值,该值代表字符或指定字符串的强调标记。
emphasisMark?: Word.EmphasisMark | "None" | "OverSolidCircle" | "OverComma" | "OverWhiteCircle" | "UnderSolidCircle";
属性值
Word.EmphasisMark | "None" | "OverSolidCircle" | "OverComma" | "OverWhiteCircle" | "UnderSolidCircle"
注解
engrave
指定字体的格式是否为刻字。 可能值包括:
true:所有文本都已刻字。false:不刻任何文本。null:如果部分(但不是全部)刻有文本,则返回 。
engrave?: boolean;
属性值
boolean
注解
fill
返回一个 FillFormat 对象,该对象包含文本区域使用的字体的填充格式属性。
fill?: Word.Interfaces.FillFormatData;
属性值
注解
glow
返回一个 GlowFormat 对象,该对象代表文本区域使用的字体的发光格式。
glow?: Word.Interfaces.GlowFormatData;
属性值
注解
hidden
指定字体是否标记为隐藏。
true 如果字体的格式设置为隐藏文本,则为 ;否则为 false。
hidden?: boolean;
属性值
boolean
注解
highlightColor
指定突出显示颜色。 若要设置它,请使用“#RRGGBB”格式或颜色名称的值。 若要删除突出显示颜色,请将其设置为 null。 返回的突出显示颜色可以是“#RRGGBB”格式、混合突出显示颜色的空字符串或 null 无突出显示颜色。 注意:Office for Windows Desktop 中只有默认突出显示颜色可用。 这些是“黄色”、“石灰”、“绿松石”、“粉色”、“蓝色”、“红色”、“深蓝色”、“青青”、“绿色”、“紫色”、“深红”、“橄榄”、“灰色”、“LightGray”和“黑色”。 当加载项在 Office for Windows 桌面版中运行时,任何其他颜色在应用于字体时将转换为最接近的颜色。
highlightColor?: string;
属性值
string
注解
italic
italicBidirectional
指定字体是否在从右到左的语言文档中斜体。 可能值包括:
true:所有文本都斜体化。false:不对文本进行斜体化。null:如果文本的某些(但不是全部)被斜体化,则返回 。
italicBidirectional?: boolean;
属性值
boolean
注解
kerning
ligature
指定 对象的连字设置 Font 。
ligature?: Word.Ligature | "None" | "Standard" | "Contextual" | "StandardContextual" | "Historical" | "StandardHistorical" | "ContextualHistorical" | "StandardContextualHistorical" | "Discretional" | "StandardDiscretional" | "ContextualDiscretional" | "StandardContextualDiscretional" | "HistoricalDiscretional" | "StandardHistoricalDiscretional" | "ContextualHistoricalDiscretional" | "All";
属性值
Word.Ligature | "None" | "Standard" | "Contextual" | "StandardContextual" | "Historical" | "StandardHistorical" | "ContextualHistorical" | "StandardContextualHistorical" | "Discretional" | "StandardDiscretional" | "ContextualDiscretional" | "StandardContextualDiscretional" | "HistoricalDiscretional" | "StandardHistoricalDiscretional" | "ContextualHistoricalDiscretional" | "All"
注解
line
返回一个 LineFormat 对象,该对象指定行的格式。
line?: Word.Interfaces.LineFormatData;
属性值
注解
name
nameAscii
指定用于拉丁文文本 (字符的字体,其字符代码从 0 (零) 到 127) 。
nameAscii?: string;
属性值
string
注解
nameBidirectional
nameFarEast
nameOther
numberForm
指定 OpenType 字体的数字形式设置。
numberForm?: Word.NumberForm | "Default" | "Lining" | "OldStyle";
属性值
Word.NumberForm | "Default" | "Lining" | "OldStyle"
注解
numberSpacing
指定字体的数字间距设置。
numberSpacing?: Word.NumberSpacing | "Default" | "Proportional" | "Tabular";
属性值
Word.NumberSpacing | "Default" | "Proportional" | "Tabular"
注解
outline
指定字体的格式是否为大纲格式。 可能值包括:
true:所有文本都已大纲显示。false:未列出任何文本。null:如果部分文本(但不是全部)已大纲显示,则返回 。
outline?: boolean;
属性值
boolean
注解
position
reflection
返回一个 ReflectionFormat 对象,该对象代表形状的反射格式。
reflection?: Word.Interfaces.ReflectionFormatData;
属性值
注解
scaling
shadow
指定字体的格式是否为阴影。 可能值包括:
true:所有文本都隐藏。false:文本均不隐藏。null:如果部分(但不是全部)文本被隐藏,则返回 。
shadow?: boolean;
属性值
boolean
注解
size
sizeBidirectional
smallCaps
指定字体的格式是否设置为小写字母,使小写字母显示为小写字母。 可能值包括:
true:所有文本都具有 Small Caps 属性。false:没有一个文本具有 Small Caps 属性。null:如果部分(但不是全部)文本具有 Small Caps 属性,则返回 。
smallCaps?: boolean;
属性值
boolean
注解
spacing
strikeThrough
指定字体是否具有删除线。
true 如果字体的格式设置为删除线文本,则为 ;否则为 false。
strikeThrough?: boolean;
属性值
boolean
注解
stylisticSet
指定字体的样式集。
stylisticSet?: Word.StylisticSet | "Default" | "Set01" | "Set02" | "Set03" | "Set04" | "Set05" | "Set06" | "Set07" | "Set08" | "Set09" | "Set10" | "Set11" | "Set12" | "Set13" | "Set14" | "Set15" | "Set16" | "Set17" | "Set18" | "Set19" | "Set20";
属性值
Word.StylisticSet | "Default" | "Set01" | "Set02" | "Set03" | "Set04" | "Set05" | "Set06" | "Set07" | "Set08" | "Set09" | "Set10" | "Set11" | "Set12" | "Set13" | "Set14" | "Set15" | "Set16" | "Set17" | "Set18" | "Set19" | "Set20"
注解
subscript
指定字体是否为下标。
true 如果字体的格式设置为下标,则为 ;否则为 false。
subscript?: boolean;
属性值
boolean
注解
superscript
指定字体是否为上标。
true 如果字体的格式设置为上标,则为 ;否则为 false。
superscript?: boolean;
属性值
boolean
注解
textColor
返回一个 ColorFormat 对象,该对象代表字体的颜色。
textColor?: Word.Interfaces.ColorFormatData;
属性值
注解
textShadow
返回一个 ShadowFormat 对象,该对象指定字体的阴影格式。
textShadow?: Word.Interfaces.ShadowFormatData;
属性值
注解
threeDimensionalFormat
返回一个 ThreeDimensionalFormat 对象,该对象包含字体的三维 (三维) 效果格式属性。
threeDimensionalFormat?: Word.Interfaces.ThreeDimensionalFormatData;
属性值
注解
underline
指定字体的下划线类型。
none 如果字体没有下划线,则为 。
underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble";
属性值
Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"
注解
underlineColor
指定对象的下划线 Font 颜色。 可以采用“#RRGGBB”格式提供值。
underlineColor?: string;
属性值
string