开发者

What's the actual font used by Firefox to render an element? [duplicate]

This question already has answers here: How can I determine what font a browser is actually using to render some tex开发者_运维知识库t? (5 answers) Closed 9 years ago.

Yes, I know about addons such as Firebug or the Web Developer Toolbar that allow one to see the font-family specification pertaining to a specific element, but how can I find out which actual font is Firefox using to render the element?

To give you an example, suppose I declare, say font-family: "Georgia", "Verdana", serif;. Now, the Georgia font is not installed in the system, and Firefox thus picks the next on the list (Verdana). Is there some addon out there that will give me access to this info?

Note that I need this functionality for development, not for detection at runtime inside Javascript.


Nothing like this exists, as far as I know.

It would be easy to test fonts in turn by using something like this:

.myElement {
    font-family:georgia, monospace;
}

In this case it's very clear whether Georgia is used or not, as it's not a monospace font.

You could use a modification of this script to add a bookmarklet in your browser for testing fonts: http://www.lalit.org/lab/javascript-css-font-detect

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜