Edit

Share via


Word.Interfaces.FontLoadOptions interface

Represents a font.

Remarks

[ API set: WordApi 1.1 ]

Properties

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

allCaps

Specifies whether the font is formatted as all capital letters, which makes lowercase letters appear as uppercase letters. The possible values are as follows:

  • true: All the text has the All Caps attribute.

  • false: None of the text has the All Caps attribute.

  • null: Returned if some, but not all, of the text has the All Caps attribute.

bold

Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false.

boldBidirectional

Specifies whether the font is formatted as bold in a right-to-left language document. The possible values are as follows:

  • true: All the text is bold.

  • false: None of the text is bold.

  • null: Returned if some, but not all, of the text is bold.

color

Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name.

colorIndex

Specifies a ColorIndex value that represents the color for the font.

colorIndexBidirectional

Specifies the color for the Font object in a right-to-left language document.

contextualAlternates

Specifies whether contextual alternates are enabled for the font.

diacriticColor

Specifies the color to be used for diacritics for the Font object. You can provide the value in the '#RRGGBB' format.

disableCharacterSpaceGrid

Specifies whether Microsoft Word ignores the number of characters per line for the corresponding Font object.

doubleStrikeThrough

Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false.

emboss

Specifies whether the font is formatted as embossed. The possible values are as follows:

  • true: All the text is embossed.

  • false: None of the text is embossed.

  • null: Returned if some, but not all, of the text is embossed.

emphasisMark

Specifies an EmphasisMark value that represents the emphasis mark for a character or designated character string.

engrave

Specifies whether the font is formatted as engraved. The possible values are as follows:

  • true: All the text is engraved.

  • false: None of the text is engraved.

  • null: Returned if some, but not all, of the text is engraved.

fill

Returns a FillFormat object that contains fill formatting properties for the font used by the range of text.

glow

Returns a GlowFormat object that represents the glow formatting for the font used by the range of text.

hidden

Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false.

highlightColor

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.

italic

Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.

italicBidirectional

Specifies whether the font is italicized in a right-to-left language document. The possible values are as follows:

  • true: All the text is italicized.

  • false: None of the text is italicized.

  • null: Returned if some, but not all, of the text is italicized.

kerning

Specifies the minimum font size for which Microsoft Word will adjust kerning automatically.

ligature

Specifies the ligature setting for the Font object.

line

Returns a LineFormat object that specifies the formatting for a line.

name

Specifies a value that represents the name of the font.

nameAscii

Specifies the font used for Latin text (characters with character codes from 0 (zero) through 127).

nameBidirectional

Specifies the font name in a right-to-left language document.

nameFarEast

Specifies the East Asian font name.

nameOther

Specifies the font used for characters with codes from 128 through 255.

numberForm

Specifies the number form setting for an OpenType font.

numberSpacing

Specifies the number spacing setting for the font.

outline

Specifies if the font is formatted as outlined. The possible values are as follows:

  • true: All the text is outlined.

  • false: None of the text is outlined.

  • null: Returned if some, but not all, of the text is outlined.

position

Specifies the position of text (in points) relative to the base line.

reflection

Returns a ReflectionFormat object that represents the reflection formatting for a shape.

scaling

Specifies the scaling percentage applied to the font.

shadow

Specifies if the font is formatted as shadowed. The possible values are as follows:

  • true: All the text is shadowed.

  • false: None of the text is shadowed.

  • null: Returned if some, but not all, of the text is shadowed.

size

Specifies a value that represents the font size in points.

sizeBidirectional

Specifies the font size in points for right-to-left text.

smallCaps

Specifies whether the font is formatted as small caps, which makes lowercase letters appear as small uppercase letters. The possible values are as follows:

  • true: All the text has the Small Caps attribute.

  • false: None of the text has the Small Caps attribute.

  • null: Returned if some, but not all, of the text has the Small Caps attribute.

spacing

Specifies the spacing between characters.

strikeThrough

Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false.

stylisticSet

Specifies the stylistic set for the font.

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.

textColor

Returns a ColorFormat object that represents the color for the font.

textShadow

Returns a ShadowFormat object that specifies the shadow formatting for the font.

threeDimensionalFormat

Returns a ThreeDimensionalFormat object that contains 3-dimensional (3D) effect formatting properties for the font.

underline

Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined.

underlineColor

Specifies the color of the underline for the Font object. You can provide the value in the '#RRGGBB' format.

Property Details

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

$all?: boolean;

Property Value

boolean

allCaps

Specifies whether the font is formatted as all capital letters, which makes lowercase letters appear as uppercase letters. The possible values are as follows:

  • true: All the text has the All Caps attribute.

  • false: None of the text has the All Caps attribute.

  • null: Returned if some, but not all, of the text has the All Caps attribute.

allCaps?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

bold

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

[ API set: WordApi 1.1 ]

boldBidirectional

Specifies whether the font is formatted as bold in a right-to-left language document. The possible values are as follows:

  • true: All the text is bold.

  • false: None of the text is bold.

  • null: Returned if some, but not all, of the text is bold.

boldBidirectional?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

color

Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name.

color?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

colorIndex

Specifies a ColorIndex value that represents the color for the font.

colorIndex?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

colorIndexBidirectional

Specifies the color for the Font object in a right-to-left language document.

colorIndexBidirectional?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

contextualAlternates

Specifies whether contextual alternates are enabled for the font.

contextualAlternates?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

diacriticColor

Specifies the color to be used for diacritics for the Font object. You can provide the value in the '#RRGGBB' format.

diacriticColor?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

disableCharacterSpaceGrid

Specifies whether Microsoft Word ignores the number of characters per line for the corresponding Font object.

disableCharacterSpaceGrid?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

doubleStrikeThrough

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

[ API set: WordApi 1.1 ]

emboss

Specifies whether the font is formatted as embossed. The possible values are as follows:

  • true: All the text is embossed.

  • false: None of the text is embossed.

  • null: Returned if some, but not all, of the text is embossed.

emboss?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

emphasisMark

Specifies an EmphasisMark value that represents the emphasis mark for a character or designated character string.

emphasisMark?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

engrave

Specifies whether the font is formatted as engraved. The possible values are as follows:

  • true: All the text is engraved.

  • false: None of the text is engraved.

  • null: Returned if some, but not all, of the text is engraved.

engrave?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

fill

Returns a FillFormat object that contains fill formatting properties for the font used by the range of text.

fill?: Word.Interfaces.FillFormatLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.3 ]

glow

Returns a GlowFormat object that represents the glow formatting for the font used by the range of text.

glow?: Word.Interfaces.GlowFormatLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.3 ]

hidden

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

[ API set: WordApiDesktop 1.2 ]

highlightColor

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?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

italic

Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false.

italic?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

italicBidirectional

Specifies whether the font is italicized in a right-to-left language document. The possible values are as follows:

  • true: All the text is italicized.

  • false: None of the text is italicized.

  • null: Returned if some, but not all, of the text is italicized.

italicBidirectional?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

kerning

Specifies the minimum font size for which Microsoft Word will adjust kerning automatically.

kerning?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

ligature

Specifies the ligature setting for the Font object.

ligature?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

line

Returns a LineFormat object that specifies the formatting for a line.

line?: Word.Interfaces.LineFormatLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.3 ]

name

Specifies a value that represents the name of the font.

name?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

nameAscii

Specifies the font used for Latin text (characters with character codes from 0 (zero) through 127).

nameAscii?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

nameBidirectional

Specifies the font name in a right-to-left language document.

nameBidirectional?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

nameFarEast

Specifies the East Asian font name.

nameFarEast?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

nameOther

Specifies the font used for characters with codes from 128 through 255.

nameOther?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

numberForm

Specifies the number form setting for an OpenType font.

numberForm?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

numberSpacing

Specifies the number spacing setting for the font.

numberSpacing?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

outline

Specifies if the font is formatted as outlined. The possible values are as follows:

  • true: All the text is outlined.

  • false: None of the text is outlined.

  • null: Returned if some, but not all, of the text is outlined.

outline?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

position

Specifies the position of text (in points) relative to the base line.

position?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

reflection

Returns a ReflectionFormat object that represents the reflection formatting for a shape.

reflection?: Word.Interfaces.ReflectionFormatLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.3 ]

scaling

Specifies the scaling percentage applied to the font.

scaling?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

shadow

Specifies if the font is formatted as shadowed. The possible values are as follows:

  • true: All the text is shadowed.

  • false: None of the text is shadowed.

  • null: Returned if some, but not all, of the text is shadowed.

shadow?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

size

Specifies a value that represents the font size in points.

size?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

sizeBidirectional

Specifies the font size in points for right-to-left text.

sizeBidirectional?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

smallCaps

Specifies whether the font is formatted as small caps, which makes lowercase letters appear as small uppercase letters. The possible values are as follows:

  • true: All the text has the Small Caps attribute.

  • false: None of the text has the Small Caps attribute.

  • null: Returned if some, but not all, of the text has the Small Caps attribute.

smallCaps?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

spacing

Specifies the spacing between characters.

spacing?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

strikeThrough

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

[ API set: WordApi 1.1 ]

stylisticSet

Specifies the stylistic set for the font.

stylisticSet?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

subscript

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

[ API set: WordApi 1.1 ]

superscript

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

[ API set: WordApi 1.1 ]

textColor

Returns a ColorFormat object that represents the color for the font.

textColor?: Word.Interfaces.ColorFormatLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.3 ]

textShadow

Returns a ShadowFormat object that specifies the shadow formatting for the font.

textShadow?: Word.Interfaces.ShadowFormatLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.3 ]

threeDimensionalFormat

Returns a ThreeDimensionalFormat object that contains 3-dimensional (3D) effect formatting properties for the font.

threeDimensionalFormat?: Word.Interfaces.ThreeDimensionalFormatLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.3 ]

underline

Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined.

underline?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

underlineColor

Specifies the color of the underline for the Font object. You can provide the value in the '#RRGGBB' format.

underlineColor?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]