What is the default font for Firefox? - Mozilla

This is a discussion on What is the default font for Firefox? - Mozilla ; Hi, I am now using an XUL editor element as an input field. But there is a qustion when I merge this element into Firefox as an extension overlay. The font in the editor is the family Times New Roman. ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: What is the default font for Firefox?

  1. What is the default font for Firefox?

    Hi,
    I am now using an XUL editor element as an input field. But there is
    a qustion when I merge this element into Firefox as an extension
    overlay. The font in the editor is the family Times New Roman. But
    Firefox's other UI such as location bar and input fields are using other
    fonts. So, could you please time what is the name of the default fonts
    of Firefox?

    Thanks in advance!

    Regards!
    Bo

  2. Re: What is the default font for Firefox?

    Bo Yang wrote:
    > Hi,
    > I am now using an XUL editor element as an input field. But there is a
    > qustion when I merge this element into Firefox as an extension overlay.
    > The font in the editor is the family Times New Roman. But Firefox's
    > other UI such as location bar and input fields are using other fonts.
    > So, could you please time what is the name of the default fonts of Firefox?
    >
    > Thanks in advance!
    >
    > Regards!
    > Bo


    I. Don't reinvent the wheel: there already are extensions to help editing
    input boxes and textareas. (I recommend "It's All Text!" for Firefox, which
    lets you invoke your favourite text editor by clicking an unobtrusive button
    in the corner of the box.)

    II. The default fonts are user-settable in several ways:

    a) default font & encoding in the "Content" tab of the Preferences;

    b) serif, sans-serif and monospace font for each language by clicking a button
    ("Advanced", IIRC) on said tab;

    c) (fine control) by CSS rules in /chrome/userContent.css (for
    whatever appears in the web pages displayed in the browser) and/or
    /chrome/userChrome.css (for the "decoration" of the browser
    window "around" those pages)
    - Each profile (if you use more than one) has its own set of user CSS sheets.
    - These files don't exist by default; you can create them by copying
    userContent-example.css and/or userChrome-example.css from the same directory.
    All rules in these "example" files are commented-out. To create and edit them,
    you can use any plaintext editor, but I recommend either the "ChromEdit"
    extension or the "ChromEdit" functionality of the "MR Tech Local Install"
    extension.
    - To find the various stylable elements in chrome and content, with their
    IDs and classes, the "DOM Inspector" is invaluable: a component distributed
    with Firefox, but not always installed by default. In Fx 1.5 or later, if it
    is installed, it appears among your Extensions in the addons manager window. I
    think it's also available separately from addons.mozilla.org but I'm not sure,
    and there are compatibility limitations: I recommend using the "distributed"
    version using a "Full" or "Custom" install if at all possible.
    - See also:
    -- http://kb.mozillazine.org/Profile_folder_-_Firefox
    -- http://kb.mozillazine.org/UserContent.css (including the pages linked
    from there)
    -- http://kb.mozillazine.org/UserChrome.css (same remark)
    -- http://www.mozilla.org/unix/customizing.html

    d) If you are writing an add-on, you can include CSS in it; but the place for
    such CSS (when applying to preexisting browser elements) would IMHO be in a
    theme rather than in an extension.



    Best regards,
    Tony.
    --
    A new dramatist of the absurd
    Has a voice that will shortly be heard.
    I learn from my spies
    He's about to devise
    An unprintable three-letter word.

  3. Re: What is the default font for Firefox?

    Tony Mechelynck:
    > Bo Yang wrote:
    >> Hi,
    >> I am now using an XUL editor element as an input field. But there is
    >> a qustion when I merge this element into Firefox as an extension
    >> overlay. The font in the editor is the family Times New Roman. But
    >> Firefox's other UI such as location bar and input fields are using
    >> other fonts. So, could you please time what is the name of the default
    >> fonts of Firefox?
    >>
    >> Thanks in advance!
    >>
    >> Regards!
    >> Bo

    >
    > I. Don't reinvent the wheel: there already are extensions to help
    > editing input boxes and textareas. (I recommend "It's All Text!" for
    > Firefox, which lets you invoke your favourite text editor by clicking an
    > unobtrusive button in the corner of the box.)

    I am sorry, maybe I have not explained my idea clearly. For some special
    reason, I need to use an editor as an input. That is not reinvent wheel
    I think.
    >
    > II. The default fonts are user-settable in several ways:
    >
    > a) default font & encoding in the "Content" tab of the Preferences;
    >
    > b) serif, sans-serif and monospace font for each language by clicking a
    > button ("Advanced", IIRC) on said tab;
    >
    > c) (fine control) by CSS rules in /chrome/userContent.css
    > (for whatever appears in the web pages displayed in the browser) and/or
    > /chrome/userChrome.css (for the "decoration" of the browser
    > window "around" those pages)
    > - Each profile (if you use more than one) has its own set of user CSS
    > sheets.
    > - These files don't exist by default; you can create them by copying
    > userContent-example.css and/or userChrome-example.css from the same
    > directory. All rules in these "example" files are commented-out. To
    > create and edit them, you can use any plaintext editor, but I recommend
    > either the "ChromEdit" extension or the "ChromEdit" functionality of the
    > "MR Tech Local Install" extension.
    > - To find the various stylable elements in chrome and content, with
    > their IDs and classes, the "DOM Inspector" is invaluable: a component
    > distributed with Firefox, but not always installed by default. In Fx 1.5
    > or later, if it is installed, it appears among your Extensions in the
    > addons manager window. I think it's also available separately from
    > addons.mozilla.org but I'm not sure, and there are compatibility
    > limitations: I recommend using the "distributed" version using a "Full"
    > or "Custom" install if at all possible.
    > - See also:
    > -- http://kb.mozillazine.org/Profile_folder_-_Firefox
    > -- http://kb.mozillazine.org/UserContent.css (including the pages
    > linked from there)
    > -- http://kb.mozillazine.org/UserChrome.css (same remark)
    > -- http://www.mozilla.org/unix/customizing.html
    >
    > d) If you are writing an add-on, you can include CSS in it; but the
    > place for such CSS (when applying to preexisting browser elements) would
    > IMHO be in a theme rather than in an extension.
    >

    This is a bad news, I think. So, could you tell me that whether this
    means that I can get the user-set font? Is there any way to get the font
    now Firefox using without regarding whether it is be set? Thanks!

    regrads!
    Bo

  4. Re: What is the default font for Firefox?

    Bo Yang wrote:
    [...]
    > This is a bad news, I think. So, could you tell me that whether this
    > means that I can get the user-set font? Is there any way to get the font
    > now Firefox using without regarding whether it is be set? Thanks!
    >
    > regrads!
    > Bo


    Couldn't you write your "editor extension" as a front-end and let Gecko do the
    displaying (so that the default or user-chosen font would be used automatically)?


    Best regards,
    Tony.
    --
    Fie for shame, you lascivious, lewd, lecherous, libidinous, lustful,
    licentious, dirty bum!!

+ Reply to Thread