detecting default browser font and size

B

Ben Long

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
 
R

Randy Webb

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?
 
B

Ben Long

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/author/dhtml/reference/methods/execcommand.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top