nsIDOMFontFace 编辑

layout/inspector/public/nsIDOMFontFace.idlScriptable Describes a single font face. 1.0 66 Introduced 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().

Attributes

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.
AttributeTypeDescription
fromFontGroupbooleanIndicates whether or not the font was located in a font group. Read only.
fromLanguagePrefsbooleanIndicates whether or not the font was located using language preferences. Read only.
fromSystemFallbackbooleanIndicates whether or not the font is the system fallback font. Read only.

Attributes available for all fonts

These attributes are always available.

AttributeTypeDescription
CSSFamilyNameDOMStringA 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.
nameDOMStringFull 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.

AttributeTypeDescription
formatDOMStringThe font format. Read only.
localNameDOMStringnull if not a src:local(...) rule. Read only.
metadataDOMStringXML metadata from WOFF file(if any). Read only.
rulensIDOMCSSFontFaceRulenull if no associated @font-face rule. Read only.
srcIndexlongIndex in the rule's src list, -1 if no @font-face rule. Read only.
URIDOMStringnull if not a downloaded font, that is local. Read only.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:97 次

字数:5211

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文