This is an archived page. It's not actively maintained.


Describes a single font face.
Gecko 7.0
Inherits from: nsISupports Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4)

This object describes a single font. It's returned in a list you can get using inIDOMUtils.getUsedFontFaces().


Font source attributes

These attributes indicate how the font was found during the font matching process.

Note: The same physical font may have been found in multiple ways within a range.

Attribute Type Description
fromFontGroup boolean Indicates whether or not the font was located in a font group. Read only.
fromLanguagePrefs boolean Indicates whether or not the font was located using language preferences. Read only.
fromSystemFallback boolean Indicates whether or not the font is the system fallback font. Read only.

Attributes available for all fonts

These attributes are always available.

Attribute Type Description
CSSFamilyName DOMString A family name that could be used in CSS font-family (not necessarily the actual name that was used, due to aliases, generics, localized names, and so on). Read only.
name DOMString Full font name as obtained from the font resource. Read only.

Attributes only available when specified with @font-face

These attributes only have meaningful values when the font is a user font defined using @font-face.

Attribute Type Description
format DOMString The font format. Read only.
localName DOMString null if not a src:local(...) rule. Read only.
metadata DOMString XML metadata from WOFF file(if any). Read only.
rule nsIDOMCSSFontFaceRule null if no associated @font-face rule. Read only.
srcIndex long Index in the rule's src list, -1 if no @font-face rule. Read only.
URI DOMString null if not a downloaded font, that is local. Read only.

See also