nsIDOMFontFace 编辑
layout/inspector/public/nsIDOMFontFace.idl
Scriptable 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.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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论