fontFamily property

[This documentation is preliminary and is subject to change.]

Sets or retrieves the name of the font used for text in the object.

CSS 2.1, Section 5.2.2

Syntax

Integer value = object.put_fontFamily(BSTR v);Integer value = object.get_fontFamily(BSTR* sFamily);

Property values

Type: BSTR

family-name (family-name)

Any of the available font families supported by the browser. For example, Times, Helvetica, Zapf-Chancery, Western, or Courier.

generic-name (generic-name)

Any of the following font families: serif, sans-serif, cursive, fantasy, or monospace.

String format

[ [ <family-name> | <generic-family> ] [ , | <family-name> | <generic-family> ]* ]

CSS information

Applies ToAll elements
Mediavisual
Inherited1
Initial Value

Standards information

Remarks

The value is a prioritized list of font family names and generic family names. List items are separated by commas to minimize confusion between multiple-word font family names. If the font family name contains white space, it should appear in single or double quotation marks; generic font family names are values and cannot appear in quotation marks.

Because you do not know which fonts users have installed, you should provide a list of alternatives with a generic font family at the end of the list. This list can include embedded fonts. For more information about embedding fonts, see the @font-face rule.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

DLL

Mshtml.dll

See also

font

 

 

Build date: 1/23/2012

Community Additions

Show: