Connecting Tech Pros Worldwide Help | Site Map

detecting default browser font and size

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 18th, 2006, 09:45 PM
Ben Long
Guest
 
Posts: n/a
Default detecting default browser font and size

I'm curious if it is possible to detect the browsers default font and
size? Most of the posts on this topic predate Windows XP, IE 5.5,
Mozilla Firefox, et al.

I've searched up and down the DOM properties, looped through most
objects and collections alerting properties and values, and I can't
find anything. This leads me to believe it is not possible to detect
the browsers default font settings.

Any insight is appreciated!

Thanks,
Ben


  #2  
Old July 18th, 2006, 10:05 PM
Randy Webb
Guest
 
Posts: n/a
Default Re: detecting default browser font and size

Ben Long said the following on 7/18/2006 5:53 PM:
Quote:
I'm curious if it is possible to detect the browsers default font and
size?
No, and it is typically irrelevant.
Quote:
Most of the posts on this topic predate Windows XP, IE 5.5,
Mozilla Firefox, et al.
Probably because it is irrelevant.
Quote:
I've searched up and down the DOM properties, looped through most
objects and collections alerting properties and values, and I can't
find anything. This leads me to believe it is not possible to detect
the browsers default font settings.
Your assumption is correct.

Why does it matter though?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
  #3  
Old July 19th, 2006, 04:45 PM
Ben Long
Guest
 
Posts: n/a
Default Re: detecting default browser font and size

Hi Randy,

Thanks for getting back to me. Ultimately, you're correct - it is
completely irrelevant. The reason I asked is one of our engineers
approached me with a problem he's having using a third-party component
with one of our IE web apps. The component is a 'rich-text-editor' that
utilizes the Microsoft-centric ExecCommand
(http://msdn.microsoft.com/workshop/a...xeccommand.asp)
and allows people to format text within the browser.

The problem he is having when using the third-party tool: if the client
declares a font that is the system default font, the third-party
utility ignores the request by excluding the formatting tags and allows
the browser to render the font using the default font setting. Insane,
I know. The problem he is having is inconsistency in the DOM with some
elements missing wrappers.

My recommendation is to use a different control for the rich-formatting
of text.

Thanks again!

- Ben

Randy Webb wrote:
Quote:
Ben Long said the following on 7/18/2006 5:53 PM:
Quote:
I'm curious if it is possible to detect the browsers default font and
size?
>
No, and it is typically irrelevant.
>
Quote:
Most of the posts on this topic predate Windows XP, IE 5.5,
Mozilla Firefox, et al.
>
Probably because it is irrelevant.
>
Quote:
I've searched up and down the DOM properties, looped through most
objects and collections alerting properties and values, and I can't
find anything. This leads me to believe it is not possible to detect
the browsers default font settings.
>
Your assumption is correct.
>
Why does it matter though?
>
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.