By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,936 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,936 IT Pros & Developers. It's quick & easy.

detecting default browser font and size

P: n/a
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

Jul 18 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ben Long said the following on 7/18/2006 5:53 PM:
I'm curious if it is possible to detect the browsers default font and
size?
No, and it is typically irrelevant.
Most of the posts on this topic predate Windows XP, IE 5.5,
Mozilla Firefox, et al.
Probably because it is irrelevant.
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/
Jul 18 '06 #2

P: n/a
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:
Ben Long said the following on 7/18/2006 5:53 PM:
I'm curious if it is possible to detect the browsers default font and
size?

No, and it is typically irrelevant.
Most of the posts on this topic predate Windows XP, IE 5.5,
Mozilla Firefox, et al.

Probably because it is irrelevant.
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/
Jul 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.