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/