Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Finding which font is being displayed
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
shreevatsa  
View profile  
 More options May 29 2008, 2:38 am
Newsgroups: mozilla.dev.tech.gfx
From: shreevatsa <shreevatsa.pub...@gmail.com>
Date: Wed, 28 May 2008 23:38:19 -0700 (PDT)
Local: Thurs, May 29 2008 2:38 am
Subject: Finding which font is being displayed
Hello,

Is it possible (to write a Firefox extension, say) to find out what
font a particular block of text is being rendered in?

Asking on IRC, I learnt of the "Font Finder" extension [http://
bendodson.com/extensions/] and window.getComputedStyle, but both of
them display the font that *should* have been there, and do not handle
substitutions that were performed in case a font was unavailable.

Is information available somewhere about the actual font that is being
used?

Thanks,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Boris Zbarsky  
View profile  
 More options May 30 2008, 12:29 am
Newsgroups: mozilla.dev.tech.gfx
From: Boris Zbarsky <bzbar...@mit.edu>
Date: Thu, 29 May 2008 23:29:22 -0500
Local: Fri, May 30 2008 12:29 am
Subject: Re: Finding which font is being displayed

shreevatsa wrote:
> Is it possible (to write a Firefox extension, say) to find out what
> font a particular block of text is being rendered in?

Note that it could be a different font for every character (or at least glyph
cluster) in the text....

> Is information available somewhere about the actual font that is being
> used?

Basically, no.  At least not exposed to anything outside gfx, last I checked.

-Boris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
robert@ocallahan.org  
View profile  
 More options Jun 2 2008, 11:05 pm
Newsgroups: mozilla.dev.tech.gfx
From: "rob...@ocallahan.org" <rocalla...@gmail.com>
Date: Mon, 2 Jun 2008 20:05:55 -0700 (PDT)
Local: Mon, Jun 2 2008 11:05 pm
Subject: Re: Finding which font is being displayed
I would like to see this too.

We should add something to inIDOMUtils for this.

Patches accepted.

Rob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
moz.li...@windingwisteria.com  
View profile  
 More options Jun 3 2008, 12:33 am
Newsgroups: mozilla.dev.tech.gfx
From: moz.li...@windingwisteria.com
Date: Mon, 2 Jun 2008 21:33:04 -0700 (PDT)
Local: Tues, Jun 3 2008 12:33 am
Subject: Re: Finding which font is being displayed

As others have mentioned several fonts can be used within a single text run due to font fallback.  Since the font matching code is platform specific, the logging is different on each platform.

Under Windows, font matching logs can be dumped even from production builds. Open up a command shell and set the following environment variable:

  set NSPR_LOG_MODULES=winfonts:5

Change directories to the one containing Firefox 3 and run the executable directly:

  firefox -console

You'll see the details of all font matching operations spewed to a console window on a character-by-character basis.

On the Mac you'll need to set up your own build and uncomment the // #define DUMP_TEXT_RUNS in gfx/thebes/src/gfxAtsuiFonts.cpp.  Rebuild, then open up a Terminal window and use:

  export NSPR_LOG_MODULES=atsuiTextRun:5
  cd <obj-dir>/dist/MinefieldDebug.app/Contents/MacOS
  firefox

Each text run will be dumped with a record of the fonts that were matched.

Beyond simple logging that works on all platforms we should probably have a way of inspecting this information so that Firebug can display this information directly.

Cheers,

John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »