You are here: Re: Determining the font characteristics of any web page? « HTML « IT news, forums, messages
Re: Determining the font characteristics of any web page?

Posted by Philip on 06/20/06 20:22

In article <jSXlg.8663$f76.6813@dukeread06>,
"Peter Olcott" <olcott@att.net> wrote:
> "Philip" <NikitaTheSpider@gmail.com> wrote in message
> news:NikitaTheSpider-78823A.15105420062006@news-rdr-02-ge0-1.southeast.rr.com.
> > I see two possibilities. First, you might be able to get this
> > information via Javascript. This page might point you in the right
> > direction:
> > http://www.quirksmode.org/dom/getstyles.html
> >
> > You might also want to consider creating a document and using Javascript
> > to measure the size of the text in it.
> >
> > The second possibility is to write a browser plugin which means it is
> > time for you to start hunting through the Plugin Writer's Guides for the
> > browsers you intend to support. It is up to the individual browser
> > whether or not they expose the kind of information you're looking for.
> >
> > Neither one of these methods is very portable from one browser to
> > another. The first one might be somewhat portable, but the second is not
> > at all.
>
> I need to know this on a web-page by web-page basis. Since each web-page is
> free
> to determine how it will display itself, I need a very generic method. I
> guess
> that I would need to start with an exhaustively comprehensive list of every
> possible way that any possible web-page could specify any of this
> information.

Both Javascript and a plugin could work on a page-by-page basis.

You last sentence makes it sound like you intend to parse each page's
HTML and CSS to determine what font(s) it is using. Is that the case?
Because you'll end up reimplementing (quirks and all) a hefty chunk of
the browser's parsing engine if that's the case.

If you are willing to be less mysterious about the larger problem you're
trying to solve, we might be able to provide better advice. As it is,
we're left with a lot to guess at.

--
Philip
http://NikitaTheSpider.com/
Bulk HTML validation, link checking and more

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация