Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

fontFamily property

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( v);Integer value = object.get_fontFamily(* 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.

The default for this property can be set for Windows Internet Explorer on the General tab of the Internet Options menu by clicking the Fonts button.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IHTMLRuleStyle::font

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.