detecting default browser font and size

Discussion in 'Javascript' started by Ben Long, Jul 18, 2006.

  1. Ben Long

    Ben Long Guest

    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!

    Ben Long, Jul 18, 2006
    1. Advertisements

  2. Ben Long

    Randy Webb Guest

    Ben Long said the following on 7/18/2006 5:53 PM:
    No, and it is typically irrelevant.
    Probably because it is irrelevant.
    Your assumption is correct.

    Why does it matter though?
    Randy Webb, Jul 18, 2006
    1. Advertisements

  3. Ben Long

    Ben Long Guest

    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
    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
    Ben Long, Jul 19, 2006
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.