Word.Interfaces.FontData interface
An interface describing the data returned by calling font.toJSON()
.
bold | Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. |
color | Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. |
double |
Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. |
hidden | Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. |
highlight |
Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or |
italic | Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. |
name | Specifies a value that represents the name of the font. |
size | Specifies a value that represents the font size in points. |
strike |
Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. |
subscript | Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. |
superscript | Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. |
underline | Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. |
Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false.
bold?: boolean;
Property Value
boolean
Remarks
Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name.
color?: string;
Property Value
string
Remarks
Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false.
doubleStrikeThrough?: boolean;
Property Value
boolean
Remarks
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false.
hidden?: boolean;
Property Value
boolean
Remarks
Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null
for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
highlightColor?: string;
Property Value
string
Remarks
Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.
italic?: boolean;
Property Value
boolean
Remarks
Specifies a value that represents the name of the font.
name?: string;
Property Value
string
Remarks
Specifies a value that represents the font size in points.
size?: number;
Property Value
number
Remarks
Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false.
strikeThrough?: boolean;
Property Value
boolean
Remarks
Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false.
subscript?: boolean;
Property Value
boolean
Remarks
Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false.
superscript?: boolean;
Property Value
boolean
Remarks
Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined.
underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble";
Property Value
Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"
Remarks
Office Add-ins feedback
Office Add-ins is an open source project. Select a link to provide feedback: